fix path
This commit is contained in:
parent
91a6016d3d
commit
c956db367f
@ -61,5 +61,6 @@ export const replaceDoorRandomKey = async (door: string) => {
|
|||||||
await client.put(doorRotatingKey(door), newKey);
|
await client.put(doorRotatingKey(door), newKey);
|
||||||
|
|
||||||
const message = `New key for door ${door}! Unlock link: ${Bun.env.BASE_DOMAIN}/door/${door}?rotatingKey=${newKey}`;
|
const message = `New key for door ${door}! Unlock link: ${Bun.env.BASE_DOMAIN}/door/${door}?rotatingKey=${newKey}`;
|
||||||
|
console.log(message);
|
||||||
await fetch(Bun.env.ROTATING_KEY_NTFY, { method: "POST", body: message });
|
await fetch(Bun.env.ROTATING_KEY_NTFY, { method: "POST", body: message });
|
||||||
}
|
}
|
||||||
@ -25,7 +25,7 @@ app.use(express.static("dist"));
|
|||||||
app.use('/api/door', DoorRouter);
|
app.use('/api/door', DoorRouter);
|
||||||
|
|
||||||
app.get("*", (req, res) => {
|
app.get("*", (req, res) => {
|
||||||
res.sendFile(path.join(__dirname, "dist", "index.html"));
|
res.sendFile(path.join(__dirname, "..", "dist", "index.html"));
|
||||||
});
|
});
|
||||||
|
|
||||||
app.listen(5000, async () => {
|
app.listen(5000, async () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user