Do not login as a new user after creation

This commit is contained in:
AG
2025-12-18 21:33:47 +02:00
parent b32f47c2b5
commit 78d4a10f33

View File

@@ -46,7 +46,6 @@ export const createUser = async (email: string, password: string): Promise<{ suc
try { try {
const res = await api.post<ApiResponse<{ user: User, token: string }>>('/auth/register', { email, password }); const res = await api.post<ApiResponse<{ user: User, token: string }>>('/auth/register', { email, password });
if (res.success && res.data) { if (res.success && res.data) {
setAuthToken(res.data.token);
return { success: true }; return { success: true };
} }
return { success: false, error: res.error }; return { success: false, error: res.error };