-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
28 lines (22 loc) · 919 Bytes
/
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 express = require('express');
const routes = express.Router();
const instructors = require('./controllers/instructors');
const members = require('./controllers/members');
routes.get('/', function(req, res) {
return res.redirect('/instructors')
})
routes.get('/instructors', instructors.index)
routes.get('/instructors/create', instructors.create)
routes.get('/instructors/:id', instructors.show)
routes.get('/instructors/:id/edit', instructors.edit)
routes.post('/instructors', instructors.post)
routes.put("/instructors", instructors.put)
routes.delete("/instructors", instructors.delete)
routes.get('/members', members.index)
routes.get('/members/create', members.create)
routes.get('/members/:id', members.show)
routes.get('/members/:id/edit', members.edit)
routes.post('/members', members.post)
routes.put("/members", members.put)
routes.delete("/members", members.delete)
module.exports = routes