-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
executable file
·30 lines (28 loc) · 1.12 KB
/
routes.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
'use strict';
const Accounts = require('./app/controllers/accounts');
const Creates = require('./app/controllers/pharmacy');
module.exports = [
{ method: 'GET', path: '/', config: Accounts.index },
{ method: 'GET', path: '/signup', config: Accounts.showSignup },
{ method: 'GET', path: '/login', config: Accounts.showLogin },
{ method: 'GET', path: '/logout', config: Accounts.logout },
{ method: 'POST', path: '/signup', config: Accounts.signup },
{ method: 'POST', path: '/login', config: Accounts.login },
{ method: 'GET', path: '/settings', config: Accounts.showSettings },
{ method: 'POST', path: '/settings', config: Accounts.updateSettings },
{ method: 'GET', path: '/home', config: Creates.home },
{ method: 'GET', path: '/list', config: Creates.list },
{ method: 'POST', path: '/newPharmacy', config: Creates.newPharmacy },
{ method: 'GET', path: '/update/{id}', config: Creates.update },
{ method: 'GET', path: '/delete/{id}', config: Creates.delete },
{
method: 'GET',
path: '/{param*}',
handler: {
directory: {
path: './public'
}
},
options: { auth: false }
}
];