-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
30 lines (19 loc) · 883 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
28
29
30
'use strict';
const express = require('express');
const router = express.Router();
const start = require('./controllers/start');
const dashboard = require('./controllers/dashboard.js');
const worklist = require('./controllers/worklist.js');
const about = require('./controllers/about.js');
router.get('/', start.index);
router.get('/dashboard', dashboard.index);
router.get('/challenge_export', dashboard.export);
router.post('/dashboard/addchallenge', dashboard.addChallenge);
router.get('/dashboard/deletechallenge/:id', dashboard.deleteChallenge);
router.get('/challenge/:id', worklist.index);
// TODO: single challenge export
// router.get('/code_export', worklist.export);
router.post('/challenge/:id/addwork', worklist.addWork);
router.get('/challenge/:id/deletework/:workid', worklist.deleteWork);
router.get('/about', about.index);
module.exports = router;