2016-06-17 18:11:52 +00:00
|
|
|
import { Router } from 'express';
|
|
|
|
import * as ProjectController from '../controllers/project.controller';
|
|
|
|
|
|
|
|
const router = new Router();
|
|
|
|
|
|
|
|
router.route('/projects').post(ProjectController.createProject);
|
|
|
|
|
2016-06-18 22:33:49 +00:00
|
|
|
router.route('/projects/:project_id').put(ProjectController.updateProject);
|
|
|
|
|
|
|
|
router.route('/projects/:project_id').get(ProjectController.getProject);
|
|
|
|
|
2016-10-12 18:24:53 +00:00
|
|
|
router.route('/projects/:project_id').delete(ProjectController.deleteProject);
|
|
|
|
|
2016-07-01 15:30:40 +00:00
|
|
|
router.route('/projects').get(ProjectController.getProjects);
|
|
|
|
|
2016-08-17 19:53:25 +00:00
|
|
|
router.route('/:username/projects').get(ProjectController.getProjectsForUser);
|
|
|
|
|
2016-11-02 18:08:53 +00:00
|
|
|
router.route('/projects/:project_id/zip').get(ProjectController.downloadProjectAsZip);
|
|
|
|
|
2016-06-23 22:29:55 +00:00
|
|
|
export default router;
|