You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

55 lines
1.6 KiB

/*
* v1 Routes
* -------------------------------------------------------------
* Put some description here!
*/
const v1 = {
/*
* Define the prefix applied to each of these routes.
* For example, if prefix is '/auth':
* '/' becomes '/auth'
* '/login' becomes '/auth/login'
*/
prefix: '/api/v1',
/*
* Define middleware that should be applied to all
* routes defined in this file. Middleware should be
* included using Flitter's global mw() function, but
* it can also be added directly using require().
*/
middleware: [
// mw('Middleware Name'),
],
/*
* Define GET routes.
* These routes are registered as GET methods.
* Handlers for these routes should be specified as
* an array of functions that are applied in order.
*
* mw() calls apply Flitter middleware
* controller() calls get methods in Flitter controllers
*/
get: {
// '/': [ controller('Controller_Name').handler_name ],
'/invitation/:id': [ _flitter.controller('api:v1').invite_show ],
'/invitation/:id/accept': [ _flitter.controller('api:v1').invite_accept ],
},
/*
* Define POST routes.
* These routes are registered as POST methods.
* Handlers for these routes should be specified as
* an array of functions that are applied in order.
*
* mw() calls apply Flitter middleware
* controller() calls get methods in Flitter controllers
*/
post: {
'/out/:key': [ _flitter.controller('api:v1').new_out ],
},
}
module.exports = v1