some code cleanup, fixed bug with regex in app.js

This commit is contained in:
Abhinav Adduri 2017-06-01 10:05:09 -07:00
parent 065f3c2014
commit 76c337836d
5 changed files with 16 additions and 23 deletions

3
app.js
View file

@ -23,12 +23,13 @@ app.get("/download/:id", function(req, res) {
app.get("/assets/download/:id", function(req, res) {
let id = req.params.id;
if (!validateID(id)){
res.send(404);
return;
}
let id = req.params.id;
client.hget(id, "filename", function(err, reply) { // maybe some expiration logic too
if (!reply) {
res.sendStatus(404);