2017-11-28 19:48:50 +00:00
|
|
|
import { Router } from 'express';
|
|
|
|
import { getProjectAsset } from '../controllers/project.controller';
|
|
|
|
import { getFileContent } from '../controllers/file.controller';
|
|
|
|
|
|
|
|
const router = new Router();
|
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.get('/:username/sketches/:project_id/*', getProjectAsset);
|
2018-10-10 22:29:53 +00:00
|
|
|
router.get('/full/:project_id/*', getProjectAsset);
|
2018-10-18 18:14:38 +00:00
|
|
|
router.get('/:username/full/:project_id/*', getProjectAsset);
|
2020-04-10 22:30:07 +00:00
|
|
|
router.get('/present/:project_id/*', getProjectAsset);
|
|
|
|
router.get('/:username/present/:project_id/*', getProjectAsset);
|
2018-10-18 18:14:38 +00:00
|
|
|
router.get('/embed/:project_id/*', getProjectAsset);
|
|
|
|
router.get('/:username/embed/:project_id/*', getProjectAsset);
|
2017-11-28 19:48:50 +00:00
|
|
|
|
2018-01-09 20:57:49 +00:00
|
|
|
router.get('/sketches/:project_id/assets/*?', getFileContent);
|
2017-11-28 19:48:50 +00:00
|
|
|
|
|
|
|
export default router;
|