mirror of
https://github.com/BobbyWibowo/lolisafe.git
synced 2025-01-19 01:31:34 +00:00
Little fix
This commit is contained in:
parent
570f6c3ce3
commit
3777c01465
@ -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 = [
|
||||
|
@ -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){
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user