From d88e9273ffcc95477e560e7b1a3bd32011e24f6c Mon Sep 17 00:00:00 2001 From: Puyodead1 Date: Fri, 8 Sep 2023 22:38:56 -0400 Subject: fix being able to register with taken username --- src/api/routes/users/@me/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/api/routes/users/@me/index.ts') diff --git a/src/api/routes/users/@me/index.ts b/src/api/routes/users/@me/index.ts index 55d2ce12..5c3cfb29 100644 --- a/src/api/routes/users/@me/index.ts +++ b/src/api/routes/users/@me/index.ts @@ -172,7 +172,7 @@ router.patch( } // check if username is already taken (pomelo only) - if (!User.isUsernameAvailable(body.username)) + if (!(await User.isUsernameAvailable(body.username))) throw FieldErrors({ username: { code: "USERNAME_ALREADY_TAKEN", -- cgit 1.5.1