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

12 lines
353 B
JavaScript
Raw Normal View History

2017-11-28 20:48:50 +01:00
import { Router } from 'express';
import { getProjectAsset } from '../controllers/project.controller';
import { getFileContent } from '../controllers/file.controller';
const router = new Router();
router.get('/:username/sketches/:project_id/*', getProjectAsset);
2017-11-28 20:48:50 +01:00
router.get('/sketches/:project_id/assets/*?', getFileContent);
2017-11-28 20:48:50 +01:00
export default router;