aboutsummaryrefslogtreecommitdiff
path: root/controllers/uploadController.js
diff options
context:
space:
mode:
Diffstat (limited to 'controllers/uploadController.js')
-rw-r--r--controllers/uploadController.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/controllers/uploadController.js b/controllers/uploadController.js
index a374137..c9959fb 100644
--- a/controllers/uploadController.js
+++ b/controllers/uploadController.js
@@ -22,7 +22,7 @@ const upload = multer({
uploadsController.upload = function(req, res, next){
- if(config.TOKEN === true)
+ if(config.private === true)
if(req.headers.auth !== config.clientToken)
return res.status(401).send('not-authorized')
@@ -70,9 +70,8 @@ uploadsController.upload = function(req, res, next){
uploadsController.list = function(req, res){
- if(config.TOKEN === true)
- if(req.headers.auth !== config.clientToken)
- return res.status(401).send('not-authorized')
+ if(req.headers.auth !== config.adminToken)
+ return res.status(401).send('not-authorized')
db.table('files').then((files) => {