Little fix

This commit is contained in:
kanadeko 2017-01-16 04:56:56 -03:00
parent 570f6c3ce3
commit 3777c01465
2 changed files with 3 additions and 3 deletions

View File

@ -6,7 +6,7 @@ let galleryController = {}
galleryController.list = function(req, res, next){
if(config.TOKEN === true)
if(req.headers.auth === config.clientToken)
if(req.headers.auth !== config.clientToken)
return res.status(401).send('not-authorized')
db.table('gallery').select('id', 'name').then((data) => {
@ -17,7 +17,7 @@ galleryController.list = function(req, res, next){
galleryController.test = function(req, res, next){
if(config.TOKEN === true)
if(req.headers.auth === config.clientToken)
if(req.headers.auth !== config.clientToken)
return res.status(401).send('not-authorized')
let testdata = [

View File

@ -18,7 +18,7 @@ const storage = multer.diskStorage({
const upload = multer({
storage: storage,
limits: { fileSize: config.uploads.maxsize }
}).single('file')
}).single('files[]')
uploadsController.upload = function(req, res, next){