mirror of
https://github.com/Nystik-gh/ignis.git
synced 2026-06-17 04:35:53 +00:00
multiple file watch fixes.
This commit is contained in:
@@ -279,9 +279,12 @@ router.delete("/unlink", async (req, res) => {
|
||||
|
||||
res.json({ ok: true });
|
||||
} catch (e) {
|
||||
const status = e.code === "ENOENT" ? 404 : 500;
|
||||
|
||||
res.status(status).json({ error: e.message, code: e.code });
|
||||
if (e.code === "ENOENT") {
|
||||
// File already gone - desired outcome achieved
|
||||
res.json({ ok: true });
|
||||
} else {
|
||||
res.status(500).json({ error: e.message, code: e.code });
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user