1
0
mirror of https://github.com/google/nomulus synced 2026-02-12 15:51:34 +00:00

Add console user role update and minor fixes to delete (#2610)

This commit is contained in:
Pavlo Tkach
2024-11-15 13:36:10 -05:00
committed by GitHub
parent e54075fea3
commit eeed166310
12 changed files with 380 additions and 183 deletions

View File

@@ -172,14 +172,20 @@ export class BackendService {
.pipe(catchError((err) => this.errorCatcher<User>(err)));
}
deleteUser(registrarId: string, emailAddress: string): Observable<any> {
deleteUser(registrarId: string, user: User): Observable<any> {
return this.http
.delete<any>(`/console-api/users?registrarId=${registrarId}`, {
body: JSON.stringify({ emailAddress }),
body: JSON.stringify(user),
})
.pipe(catchError((err) => this.errorCatcher<any>(err)));
}
updateUser(registrarId: string, updatedUser: User): Observable<any> {
return this.http
.put<User>(`/console-api/users?registrarId=${registrarId}`, updatedUser)
.pipe(catchError((err) => this.errorCatcher<any>(err)));
}
getUserData(): Observable<UserData> {
return this.http
.get<UserData>('/console-api/userdata')