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:
@@ -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;
|
||||
Reference in New Issue
Block a user