Fix codecheck again

This commit is contained in:
Leon Meier 2025-03-02 18:18:05 +01:00
parent f1ddaa1cc2
commit bca596fa75

View File

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