From fbef411bb1a0987a753024fc7822683fd3dc1df8 Mon Sep 17 00:00:00 2001 From: josh97josh Date: Mon, 16 Apr 2018 18:03:59 +0100 Subject: minor errors fixed --- src/FileRouter.ts | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/FileRouter.ts') 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 => { + //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(); }; -- cgit v1.2.1