drop.chapril.org-firefoxsend/server/routes/delete.js
2021-03-15 19:56:51 +01:00

12 lines
222 B
JavaScript

const storage = require('../storage');
module.exports = async function(req, res) {
try {
const id = req.params.id;
await storage.del(id);
res.sendStatus(200);
} catch (e) {
res.sendStatus(404);
}
};