drop.chapril.org-firefoxsend/server/routes/delete.js

12 lines
222 B
JavaScript
Raw Normal View History

const storage = require('../storage');
module.exports = async function(req, res) {
try {
2019-02-12 20:50:06 +01:00
const id = req.params.id;
await storage.del(id);
2018-02-06 23:31:18 +01:00
res.sendStatus(200);
} catch (e) {
res.sendStatus(404);
}
};