mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-09 01:13:55 +00:00
refactor: restructure model to contain an object of rundowns
This commit is contained in:
@@ -18,9 +18,9 @@ import * as projectService from '../../services/project-service/ProjectService.j
|
||||
|
||||
export async function patchPartialProjectFile(req: Request, res: Response<DatabaseModel | ErrorResponse>) {
|
||||
try {
|
||||
const { rundown, project, settings, viewSettings, urlPresets, customFields, automation } = req.body;
|
||||
const { rundowns, project, settings, viewSettings, urlPresets, customFields, automation } = req.body;
|
||||
const patchDb: DatabaseModel = {
|
||||
rundown,
|
||||
rundowns,
|
||||
project,
|
||||
settings,
|
||||
viewSettings,
|
||||
|
||||
@@ -18,7 +18,7 @@ const filterImageFile = (_req: Request, file: Express.Multer.File, cb: FileFilte
|
||||
} else {
|
||||
cb(null, false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Build multer uploader for a single file
|
||||
export const uploadProjectFile = multer({
|
||||
|
||||
@@ -59,7 +59,7 @@ export const validatePatchProject = [
|
||||
next();
|
||||
},
|
||||
|
||||
body('rundown').isArray().optional({ nullable: false }),
|
||||
body('rundowns').isObject().optional({ nullable: false }),
|
||||
body('project').isObject().optional({ nullable: false }),
|
||||
body('settings').isObject().optional({ nullable: false }),
|
||||
body('viewSettings').isObject().optional({ nullable: false }),
|
||||
|
||||
Reference in New Issue
Block a user