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

12 lines
365 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.route('/:username/sketches/:project_id/*').get(getProjectAsset);
router.route('/sketches/:project_id/assets/*?').get(getFileContent);
export default router;