This commit is contained in:
2025-11-14 23:06:43 +05:30
parent 7faedcf2f9
commit 068a741706

View File

@@ -19,7 +19,7 @@ export const AuthProvider: React.FC<{ children: React.ReactNode }> = ({ children
setError(null);
const res = await api.post('/auth/register', { username, password });
return res.data; // returns PublicUser from the backend
return res.data;
} catch (err: any) {
console.error('Registration failed:', err);
setError(err.response?.data?.detail || 'Registration failed');