From 0c6912d2c344253dc116d17a78ae364c53cb1eaa Mon Sep 17 00:00:00 2001 From: kanadeko Date: Sun, 15 Jan 2017 03:15:08 -0300 Subject: stuff --- routes/api.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'routes/api.js') 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 !== '') -- cgit v1.2.3