Merged migrations into one big v1->v2 which is not incremental, thus it does not need code copy-pasting.
Some fixes.
This commit is contained in:
parent
32cad03f4f
commit
b1c667d13d
24 changed files with 977 additions and 1044 deletions
|
@ -4,8 +4,8 @@ const router = require('../lib/router-async').create();
|
|||
const files = require('../models/files');
|
||||
const contextHelpers = require('../lib/context-helpers');
|
||||
|
||||
router.getAsync('/:type/:entityId/:fileName', async (req, res) => {
|
||||
const file = await files.getFileByFilename(contextHelpers.getAdminContext(), req.params.type, req.params.entityId, req.params.fileName);
|
||||
router.getAsync('/:type/:subType/:entityId/:fileName', async (req, res) => {
|
||||
const file = await files.getFileByFilename(contextHelpers.getAdminContext(), req.params.type, req.params.subType, req.params.entityId, req.params.fileName);
|
||||
res.type(file.mimetype);
|
||||
return res.download(file.path, file.name);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue