aboutsummaryrefslogtreecommitdiff
path: root/routes
diff options
context:
space:
mode:
authorPitu <[email protected]>2017-01-19 02:37:35 -0300
committerPitu <[email protected]>2017-01-19 02:37:35 -0300
commit83aaef0f824e8776ddf4c60a44e6d56c21a0efcc (patch)
treeb9474b361cc328d43fe5bfd4949702c6566819f2 /routes
parentSmall fixes (diff)
downloadhost.fuwn.me-83aaef0f824e8776ddf4c60a44e6d56c21a0efcc.tar.xz
host.fuwn.me-83aaef0f824e8776ddf4c60a44e6d56c21a0efcc.zip
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
Diffstat (limited to 'routes')
-rw-r--r--routes/api.js6
1 files changed, 5 insertions, 1 deletions
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