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); }); }