From 33617bc1a2d24e269af29d0250fe95493971ffd8 Mon Sep 17 00:00:00 2001 From: Tom Harley Date: Thu, 26 Apr 2018 05:00:31 +0100 Subject: Miscellaneous minor fixes --- src/FileRouter.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/FileRouter.ts') diff --git a/src/FileRouter.ts b/src/FileRouter.ts index 35d3977..957b596 100644 --- a/src/FileRouter.ts +++ b/src/FileRouter.ts @@ -569,7 +569,7 @@ const postProjectName: Middleware = async( } }); if (ujp != null) { - logger.debug(`Removing ${req.body.username}'s old privileges in ${project.name}`); + logger.debug(`Removing ${req.body.username}'s old privileges in ${project.name}`); await ujp.destroy(); } if (req.body.access_level !== 'none') { @@ -851,7 +851,7 @@ const postFilePath: Middleware = async( if (res.locals.file) { /* tslint:disable-next-line:curly */ - if (req.query.action) switch (req.query.action) { + if (req.query.action && req.query.action !== 'upload') switch (req.query.action) { case 'set_metadata': { res.locals.file.metadata = JSON.parse(req.body.toString()); await res.locals.file.save(); @@ -934,7 +934,6 @@ const postFilePath: Middleware = async( } } } else { - /* tslint:disable-next-line:curly */ if (req.query.action) { switch (req.query.action) { case 'mkdir': { -- cgit v1.2.1