From 92b9d60c00432c58d6184f3683bdb14a0300a3c6 Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 8 Aug 2018 10:55:27 +0200 Subject: Add ability to delete our account --- client/src/app/shared/users/user.service.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'client/src/app/shared') diff --git a/client/src/app/shared/users/user.service.ts b/client/src/app/shared/users/user.service.ts index 365a21df7..e6dc3dbf8 100644 --- a/client/src/app/shared/users/user.service.ts +++ b/client/src/app/shared/users/user.service.ts @@ -39,6 +39,16 @@ export class UserService { ) } + deleteMe () { + const url = UserService.BASE_USERS_URL + 'me' + + return this.authHttp.delete(url) + .pipe( + map(this.restExtractor.extractDataBool), + catchError(err => this.restExtractor.handleError(err)) + ) + } + changeAvatar (avatarForm: FormData) { const url = UserService.BASE_USERS_URL + 'me/avatar/pick' -- cgit v1.2.3