2020-01-14 01:57:43 +00:00
|
|
|
'use strict'
|
|
|
|
|
|
|
|
/*
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
| Routes
|
|
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
| Http routes are entry points to your web application. You can create
|
|
|
|
| routes for different URL's and bind Controller actions to them.
|
|
|
|
|
|
|
|
|
| A complete guide on routing is available here.
|
|
|
|
| http://adonisjs.com/docs/4.1/routing
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
/** @type {typeof import('@adonisjs/framework/src/Route/Manager')} */
|
|
|
|
const Route = use('Route')
|
|
|
|
|
2020-01-18 20:46:06 +00:00
|
|
|
Route.get('/', 'IndexController.index').as('home');
|
|
|
|
|
|
|
|
/*
|
|
|
|
/ Auth
|
|
|
|
*/
|
|
|
|
Route.get('/logout', 'AuthController.logout').as('logout').middleware(['auth']);
|
|
|
|
Route.get('/register', 'AuthController.registerIndex').as('register');
|
|
|
|
Route.get('/login', 'AuthController.loginIndex').as('login');
|
|
|
|
Route.post('/register', 'AuthController.register').validator('Register');
|
|
|
|
Route.post('/login', 'AuthController.login').validator('Login');
|
|
|
|
|