chore: rework useSubmit (#2649)

rework useSubmit
This commit is contained in:
Bernd Storath
2026-06-03 10:08:07 +02:00
committed by GitHub
parent e03d743307
commit bc95a2851f
16 changed files with 124 additions and 127 deletions
+3 -3
View File
@@ -18,9 +18,9 @@ export default defineEventHandler(async (event) => {
statusMessage: 'Invalid username or password',
});
case 'TOTP_REQUIRED':
return { status: 'TOTP_REQUIRED' };
return { status: 'TOTP_REQUIRED' as const };
case 'INVALID_TOTP_CODE':
return { status: 'INVALID_TOTP_CODE' };
return { status: 'INVALID_TOTP_CODE' as const };
case 'USER_DISABLED':
throw createError({
statusCode: 401,
@@ -47,5 +47,5 @@ export default defineEventHandler(async (event) => {
SERVER_DEBUG(`New Session: ${data.id} for ${user.id} (${user.username})`);
return { status: 'success' };
return { status: 'success' as const };
});