feat(auth): add registration page

This commit is contained in:
shafin-r
2026-03-09 15:05:09 +06:00
parent 8dbadae58c
commit b5edb3554f
6 changed files with 523 additions and 3 deletions

View File

@ -22,6 +22,12 @@ export interface LoginRequest {
email: string;
password: string;
}
export interface RegistrationRequest {
email: string;
name: string;
avatar_url: string;
password: string;
}
export interface User {
email: string;
@ -96,6 +102,14 @@ class ApiClient {
body: JSON.stringify(credentials),
});
}
async register(
credentials: RegistrationRequest,
): Promise<{ message: string }> {
return this.request<{ message: string }>("/auth/register/", {
method: "POST",
body: JSON.stringify(credentials),
});
}
// Authenticated request helper
async authenticatedRequest<T>(