aboutsummaryrefslogtreecommitdiff
path: root/src/FileRouter.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/FileRouter.ts')
-rw-r--r--src/FileRouter.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/FileRouter.ts b/src/FileRouter.ts
index 0e42ecf..a80db1f 100644
--- a/src/FileRouter.ts
+++ b/src/FileRouter.ts
@@ -175,7 +175,7 @@ const postProperties: Middleware = (
logger.debug('Editing server properties');
res.locals.modified = true;
for (const newProp of req.body) {
- const prop: Property | undefined = serverConfig.find(
+ let prop: Property | undefined = serverConfig.find(
(p: Property): boolean => p.id === newProp.id
);
if (prop === undefined) {
@@ -187,6 +187,7 @@ const postProperties: Middleware = (
}
try {
prop.value = newProp.value;
+
} catch (err) {
// FIXME: Assuming it's a value-type error, but it might not be!
next(new RequestError(400, 'invalid_property_value', undefined, newProp.id));
@@ -1075,6 +1076,7 @@ export class FileRouter {
name: projectName
}
});
+ console.log("here")
next();
}
);