aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/users
diff options
context:
space:
mode:
Diffstat (limited to 'client/src/app/shared/users')
-rw-r--r--client/src/app/shared/users/user.service.ts6
1 files changed, 3 insertions, 3 deletions
diff --git a/client/src/app/shared/users/user.service.ts b/client/src/app/shared/users/user.service.ts
index 5ab290a59..d9b81c181 100644
--- a/client/src/app/shared/users/user.service.ts
+++ b/client/src/app/shared/users/user.service.ts
@@ -170,19 +170,19 @@ export class UserService {
170 ) 170 )
171 } 171 }
172 172
173 removeUser (user: User) { 173 removeUser (user: { id: number }) {
174 return this.authHttp.delete(UserService.BASE_USERS_URL + user.id) 174 return this.authHttp.delete(UserService.BASE_USERS_URL + user.id)
175 .pipe(catchError(err => this.restExtractor.handleError(err))) 175 .pipe(catchError(err => this.restExtractor.handleError(err)))
176 } 176 }
177 177
178 banUser (user: User, reason?: string) { 178 banUser (user: { id: number }, reason?: string) {
179 const body = reason ? { reason } : {} 179 const body = reason ? { reason } : {}
180 180
181 return this.authHttp.post(UserService.BASE_USERS_URL + user.id + '/block', body) 181 return this.authHttp.post(UserService.BASE_USERS_URL + user.id + '/block', body)
182 .pipe(catchError(err => this.restExtractor.handleError(err))) 182 .pipe(catchError(err => this.restExtractor.handleError(err)))
183 } 183 }
184 184
185 unbanUser (user: User) { 185 unbanUser (user: { id: number }) {
186 return this.authHttp.post(UserService.BASE_USERS_URL + user.id + '/unblock', {}) 186 return this.authHttp.post(UserService.BASE_USERS_URL + user.id + '/unblock', {})
187 .pipe(catchError(err => this.restExtractor.handleError(err))) 187 .pipe(catchError(err => this.restExtractor.handleError(err)))
188 } 188 }