Fix: cast DB row to AuthTokenPayload in findUser\n\nCast database RowDataPacket to AuthTokenPayload so generateToken receives the correct type.\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

This commit is contained in:
2026-07-08 10:27:21 +02:00
parent 7247a78809
commit 36ec8da1a0
18 changed files with 1429 additions and 367 deletions
+9
View File
@@ -0,0 +1,9 @@
export const returnErrorCode = (errorKey) => {
if (!Array.isArray(errorKey) || errorKey.length < 2) {
return false;
}
return {code: errorKey[0], message: errorKey[1], data: null};
};
export default returnErrorCode;