From 83aaef0f824e8776ddf4c60a44e6d56c21a0efcc Mon Sep 17 00:00:00 2001 From: Pitu Date: Thu, 19 Jan 2017 02:37:35 -0300 Subject: Changed request system and post data Changed from XMLHttpRequest to Axiios and made every POST call to look for params or json and not pass the values as headers. Token is still a header though --- routes/api.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'routes') diff --git a/routes/api.js b/routes/api.js index 81a15bb..4333c74 100644 --- a/routes/api.js +++ b/routes/api.js @@ -13,11 +13,15 @@ routes.get ('/check', (req, res, next) => { routes.get ('/uploads', (req, res, next) => uploadController.list(req, res)) routes.post ('/upload', (req, res, next) => uploadController.upload(req, res, next)) + +routes.get ('/album/:id', (req, res, next) => uploadController.list(req, res, next)) routes.get ('/albums', (req, res, next) => albumsController.list(req, res, next)) +routes.get ('/albums/:sidebar', (req, res, next) => albumsController.list(req, res, next)) routes.post ('/albums', (req, res, next) => albumsController.create(req, res, next)) routes.get ('/albums/test', (req, res, next) => albumsController.test(req, res, next)) -routes.get ('/tokens/verify', (req, res, next) => tokenController.verify(req, res)) + routes.get ('/tokens', (req, res, next) => tokenController.list(req, res)) +routes.post ('/tokens/verify', (req, res, next) => tokenController.verify(req, res)) routes.post ('/tokens/change', (req, res, next) => tokenController.change(req, res)) module.exports = routes -- cgit v1.2.3