Commit c444e602 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Switch to REST for the user deletion

parent fece977f
...@@ -276,14 +276,12 @@ export class UserService { ...@@ -276,14 +276,12 @@ export class UserService {
} }
public deleteUser() { public deleteUser() {
return this.http.delete('/backend/api/delete_user').pipe( return this.http.delete('/rest/user').pipe(
catchError(this.handleError(true, "Error deleting user")), catchError(this.handleError(true, "Error deleting user")),
).subscribe( ).subscribe(
(data: {deleted: boolean}) => { _ => {
if (data && data.deleted) {
this.user$.next(undefined); this.user$.next(undefined);
this.snackBar.open('Deleted user from server'); this.snackBar.open('Deleted user from server');
}
}, },
this.logErrorAndFetch, this.logErrorAndFetch,
); );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment