diff options
| author | Kamen Mladenov <kamen.d.mladenov@protonmail.com> | 2021-04-08 08:24:34 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-08 08:24:34 +0300 |
| commit | cfa5391e0f887f7da00ddce8d604897ca08b680f (patch) | |
| tree | 5c6aa123de001fda93720e7dd156fe2626305da0 /src/app/services/user.service.ts | |
| parent | b9d5225b7e9f820c28690c243b067cfeb5251d74 (diff) | |
| parent | 10a4896a17495548ed3ce6b333939203b698470b (diff) | |
| download | DevHive-Angular-cfa5391e0f887f7da00ddce8d604897ca08b680f.tar DevHive-Angular-cfa5391e0f887f7da00ddce8d604897ca08b680f.tar.gz DevHive-Angular-cfa5391e0f887f7da00ddce8d604897ca08b680f.zip | |
Merge pull request #5 from Team-Kaleidoscope/profile-picture-update
Profile picture request update
Diffstat (limited to 'src/app/services/user.service.ts')
| -rw-r--r-- | src/app/services/user.service.ts | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/src/app/services/user.service.ts b/src/app/services/user.service.ts index 10c8c59..e910ada 100644 --- a/src/app/services/user.service.ts +++ b/src/app/services/user.service.ts @@ -45,13 +45,6 @@ export class UserService { return this.putUserRequest(userId, token, updateUserFormGroup, languages, technologies, userRoles, userFriends); } - putProfilePictureFromSessionStorageRequest(newPicture: File): Observable<object> { - const userId = this._tokenService.getUserIdFromSessionStorageToken(); - const token = this._tokenService.getTokenFromSessionStorage(); - - return this.putProfilePictureRequest(userId, token, newPicture); - } - putBareUserFromSessionStorageRequest(user: User, password: string): Observable<object> { const userId = this._tokenService.getUserIdFromSessionStorageToken(); const token = this._tokenService.getTokenFromSessionStorage(); @@ -150,16 +143,6 @@ export class UserService { return this._http.put(AppConstants.API_USER_URL, body, options); } - putProfilePictureRequest(userId: Guid, authToken: string, newPicture: File): Observable<object> { - const form = new FormData(); - form.append('picture', newPicture); - const options = { - params: new HttpParams().set('UserId', userId.toString()), - headers: new HttpHeaders().set('Authorization', 'Bearer ' + authToken) - }; - return this._http.put(AppConstants.API_USER_URL + '/ProfilePicture', form, options); - } - deleteUserRequest(userId: Guid, authToken: string): Observable<object> { const options = { params: new HttpParams().set('Id', userId.toString()), |
