Added multiple download option

This commit is contained in:
Danny Coates 2017-11-30 13:41:09 -08:00
parent beb3a6e67b
commit 7b4060f9e1
No known key found for this signature in database
GPG key ID: 4C442633C62E00CB
22 changed files with 1159 additions and 453 deletions

View file

@ -12,15 +12,15 @@ module.exports = async function(req, res) {
return;
}
const delete_token = req.body.delete_token;
const ownerToken = req.body.owner_token || req.body.delete_token;
if (!delete_token) {
if (!ownerToken) {
res.sendStatus(404);
return;
}
try {
const err = await storage.delete(id, delete_token);
const err = await storage.delete(id, ownerToken);
if (!err) {
res.sendStatus(200);
}