From bca596fa7549287ed4e1b98d0f9bcda1e6f1c94e Mon Sep 17 00:00:00 2001 From: Spacelord Date: Sun, 2 Mar 2025 18:18:05 +0100 Subject: [PATCH] Fix codecheck again --- src/routes/api/v1/user_codecheck.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/routes/api/v1/user_codecheck.ts b/src/routes/api/v1/user_codecheck.ts index 0cca74b..60c7833 100644 --- a/src/routes/api/v1/user_codecheck.ts +++ b/src/routes/api/v1/user_codecheck.ts @@ -24,9 +24,10 @@ async function get(req: Request, res: Response) { .then((result) => { // user has no code OR code must match // result?.code === '' -> user exists and has no code + // result?.code === null -> user exists and has no code // result?.code === undefined -> user does not exists // value.code === result?.code -> If user exists and has no code this matches - res.status(200).json(result?.code === '' || result?.code === undefined || value.code === result?.code); + res.status(200).json(result?.code === '' || result?.code === null || result?.code === undefined || value.code === result?.code); //log.api?.debug(result, result?.code); }); }