diff options
| author | kanadeko <[email protected]> | 2017-01-15 03:15:08 -0300 |
|---|---|---|
| committer | kanadeko <[email protected]> | 2017-01-15 03:15:08 -0300 |
| commit | 0c6912d2c344253dc116d17a78ae364c53cb1eaa (patch) | |
| tree | 67abef98a870cab5707a546b87b287b6b3205c13 /routes/api.js | |
| parent | Merge branch 'master' of https://github.com/WeebDev/loli-safe (diff) | |
| download | host.fuwn.me-0c6912d2c344253dc116d17a78ae364c53cb1eaa.tar.xz host.fuwn.me-0c6912d2c344253dc116d17a78ae364c53cb1eaa.zip | |
stuff
Diffstat (limited to 'routes/api.js')
| -rw-r--r-- | routes/api.js | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/routes/api.js b/routes/api.js index 23a1a60..a4e8e0b 100644 --- a/routes/api.js +++ b/routes/api.js @@ -3,6 +3,12 @@ const routes = require('express').Router() const uploadController = require('../controllers/uploadController') const galleryController = require('../controllers/galleryController') +routes.get ('/check', (req, res, next) => { + if(config.TOKEN === '') + return res.json({token: false}) + return res.json({token: true}) +}) + routes.get ('/info', (req, res, next) => { if(config.TOKEN !== '') |