From 299be3618df0cc716c8d98947953e212973757ea Mon Sep 17 00:00:00 2001 From: Ben Date: Wed, 5 Sep 2018 22:10:22 +0100 Subject: [PATCH] started planning endpoints --- src/controllers/routes/router.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/controllers/routes/router.js b/src/controllers/routes/router.js index 70960d8..64f3c1d 100644 --- a/src/controllers/routes/router.js +++ b/src/controllers/routes/router.js @@ -22,6 +22,18 @@ export class Router { app.post('/unauth/permanote', [MiddleWare.RateLimits.request, Controllers.PermaLinkController.unauthentacatedPermaLink]); app.get('/note/:endpoint', [MiddleWare.RateLimits.request, Controllers.PermaLinkController.getNote]); + app.post('/auth/note'); // Passes through auth middleware which if authenticated passes user obj and token to the note handling function for it to deal with + app.post('/aith/group'); + + app.get('/auth/getallnotes'); + app.get('/auth/getallgroups'); + + app.post('/auth/movenote'); + app.post('/auth/movegroup'); + + app.delete('/auth/deletenote'); + app.delete('/auth/deletegroup'); + app.get('*', [MiddleWare.RateLimits.request, StatusCodes.pageNotFound]); Logger.info('HTTP endpoints settup'); }