|
@@ -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 = [
|