Add support for fetching session data; add /start url
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

(Noded/frontend#15)
This commit is contained in:
2020-10-12 20:31:57 -05:00
parent 6ee03ec0f8
commit 273460b126
4 changed files with 82 additions and 24 deletions

View File

@@ -0,0 +1,18 @@
const index = {
prefix: '/api/v1/session',
middleware: [
'auth:UserOnly',
],
get: {
'/': [ 'controller::api:v1:Session.get_session' ],
},
post: {
},
}
module.exports = exports = index

View File

@@ -41,9 +41,12 @@ const index = {
// e.g. controller::Home.welcome
'/': ['controller::Home.welcome'],
'/stat': ['controller::Home.get_stat'],
// Placeholder for auth dashboard. You'd replace this with
// your own route protected by 'middleware::auth:UserOnly'
'/dash': ['controller::Home.toApp'],
'/dash': ['middleware::auth:UserOnly', 'controller::Home.toApp'],
'/start': ['middleware::auth:UserOnly', 'controller::Home.toApp'],
'/login': ['middleware::auth:GuestOnly', 'controller::Home.get_login'],
'/test-json': ['controller::Export.json_export'],
'/test-markdown': ['controller::Export.markdown_export'],