aboutsummaryrefslogtreecommitdiff
path: root/src/FileRouter.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/FileRouter.ts')
-rw-r--r--src/FileRouter.ts2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/FileRouter.ts b/src/FileRouter.ts
index 9a7dcac..ff8f5c1 100644
--- a/src/FileRouter.ts
+++ b/src/FileRouter.ts
@@ -367,6 +367,7 @@ const postCurUser: Middleware = async(
const postUsername: Middleware = async(
req: Request, res: Response, next: NextFunction
): Promise<void> => {
+ //if (req.query.action === 'create')
let user: User | null | undefined = res.locals.user;
res.locals.modified = true;
if (user == null) {
@@ -382,6 +383,7 @@ const postUsername: Middleware = async(
if (req.body) {
user.metadata = req.body;
}
+ await user.save()
next();
};