aboutsummaryrefslogtreecommitdiff
path: root/src/FileRouter.ts
diff options
context:
space:
mode:
authorjw2552018-04-19 21:10:18 +0100
committerjw2552018-04-19 21:10:18 +0100
commitb8ed41883fb0b9faf2733632657243c7dece4d6e (patch)
tree0d8097e066a927287ce80d4f4b5a6cfc64ca1ebd /src/FileRouter.ts
parentfixed test-crash (diff)
downloadmedicine-b8ed41883fb0b9faf2733632657243c7dece4d6e.tar.gz
medicine-b8ed41883fb0b9faf2733632657243c7dece4d6e.zip

reduced # of failing tests

Diffstat (limited to 'src/FileRouter.ts')
-rw-r--r--src/FileRouter.ts8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/FileRouter.ts b/src/FileRouter.ts
index 53fc537..3f966c2 100644
--- a/src/FileRouter.ts
+++ b/src/FileRouter.ts
@@ -168,7 +168,7 @@ const getProperties: Middleware = (
const postProperties: Middleware = (
req: Request, res: Response, next: NextFunction
): void => {
- logger.debug('Editing server properties');
+ console.log('Editing server properties');
res.locals.modified = true;
for (const newProp of req.body) {
const prop: Property | undefined = serverConfig.find(
@@ -189,6 +189,7 @@ const postProperties: Middleware = (
return;
}
}
+ console.log("Posted Properties successfully");
next();
};
@@ -629,7 +630,8 @@ const postFilePath: Middleware = async(req: Request, res: Response, next: NextFu
// Sets final if requested
if (res.locals.file && qH.isFinal(req)) {
- res.locals.file.status = 'final';
+ res.locals.file.status = 'preprocessing';
+ // start file conversion
}
// Sets Metadata if requested
@@ -767,7 +769,7 @@ export class FileRouter {
// File access
this.router.get ('/projects/:project_name/files/:path', getFilePath);
this.router.post('/projects/:project_name/files/:path',
- upload.single('userfile'), postFilePath);
+ upload.single('userfile'), postFilePath);
this.router.get ('/projects/:project_name/files_by_id/:id', getFileId);
}