p5.js-web-editor/server/routes/project.routes.js

19 lines
600 B
JavaScript
Raw Normal View History

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);
router.route('/projects/:project_id').delete(ProjectController.deleteProject);
2016-07-01 15:30:40 +00:00
router.route('/projects').get(ProjectController.getProjects);
router.route('/:username/projects').get(ProjectController.getProjectsForUser);
2016-06-23 22:29:55 +00:00
export default router;