Files
theis.gaedigk 6be34c93aa refactor: edit tailwindcss classes and change code formatting, therefore added .prettierrc file
fix: frontend bug where the passwords won't be checked when the password is changed
2026-07-08 14:56:43 +02:00

15 lines
294 B
TypeScript

import type { ErrorCode } from "../misc/types.ts";
export const returnErrorCode = (errorKey: ErrorCode) => {
if (!Array.isArray(errorKey) || errorKey.length < 2) {
return false;
}
return {
success: false,
code: errorKey[0],
data: null,
message: errorKey[1],
};
};