-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
27 lines (22 loc) · 1.01 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
const Accounts = require('./app/controllers/accounts');
const Donations = require('./app/controllers/donations');
const Assets = require('./app/controllers/assets');
module.exports = [
{method: 'GET', path: '/', config: Accounts.main},
{method: 'GET', path: '/signup', config: Accounts.signup},
{method: 'GET', path: '/login', config: Accounts.login},
{method: 'POST', path: '/login', config: Accounts.authenticate},
{method: 'GET', path: '/logout', config: Accounts.logout},
{method: 'POST', path: '/register', config: Accounts.register},
{method: 'GET', path: '/settings', config: Accounts.viewSettings},
{method: 'POST', path: '/settings', config: Accounts.updateSettings},
{method: 'GET', path: '/home', config: Donations.home},
{method: 'GET', path: '/report', config: Donations.report},
{method: 'POST', path: '/donate', config: Donations.donate},
{
method: 'GET',
path: '/{param*}',
config: {auth: false},
handler: Assets.servePublicDirectory,
},
];