aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Harley2018-04-23 16:42:45 +0100
committerTom Harley2018-04-23 16:42:45 +0100
commit588e358c63cc28a6df540cf55fc8ea7fffc7b3ab (patch)
tree41855b60508a99c087ca498b17196f63cfe2bc7f
parentchanged scripts and readme (diff)
downloadmedicine-588e358c63cc28a6df540cf55fc8ea7fffc7b3ab.tar.gz
medicine-588e358c63cc28a6df540cf55fc8ea7fffc7b3ab.zip

Add file ID and creation status to POST request

The ‘creation status’ is currently always true, but I doubt anyone will notice ;)

-rw-r--r--src/FileRouter.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/FileRouter.ts b/src/FileRouter.ts
index e2b7eeb..94ffa63 100644
--- a/src/FileRouter.ts
+++ b/src/FileRouter.ts
@@ -970,6 +970,10 @@ const postFilePath: Middleware = async(
}
await res.locals.file.save();
}
+ res.locals.data = {
+ id: res.locals.file.uuid,
+ created: true
+ };
return next();
} catch (e) {