mirror of
https://gitlab.com/timvisee/send.git
synced 2025-12-07 14:40:55 +03:00
some code cleanup, fixed bug with regex in app.js
This commit is contained in:
3
app.js
3
app.js
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user