optimize account creation and verification
This commit is contained in:
@@ -14,8 +14,8 @@ export class AuthService {
|
||||
|
||||
constructor(private http: HttpClient) {}
|
||||
|
||||
register(name: string, email: string, password: string): Observable<{ message: string }> {
|
||||
return this.http.post<{ message: string }>('/api/auth/register', { name, email, password });
|
||||
register(email: string): Observable<{ message: string }> {
|
||||
return this.http.post<{ message: string }>('/api/auth/register', { email });
|
||||
}
|
||||
|
||||
login(email: string, password: string): Observable<AuthResponse> {
|
||||
@@ -41,8 +41,8 @@ export class AuthService {
|
||||
return this.http.post<{ message: string }>('/api/auth/resend-verification', { email });
|
||||
}
|
||||
|
||||
setPassword(setupToken: string, password: string): Observable<void> {
|
||||
return this.http.post<void>('/api/auth/set-password', { setupToken, password });
|
||||
setPassword(setupToken: string, password: string, name: string): Observable<void> {
|
||||
return this.http.post<void>('/api/auth/set-password', { setupToken, password, name });
|
||||
}
|
||||
|
||||
getAccessToken(): string | null {
|
||||
|
||||
Reference in New Issue
Block a user