(id, body, self = false)
| 3436 | } |
| 3437 | |
| 3438 | static async updateUser(id, body, self = false) { |
| 3439 | try { |
| 3440 | const response = await request( |
| 3441 | `${host}/api/accounts/users/${self ? 'me' : id}/`, |
| 3442 | { |
| 3443 | method: 'PATCH', |
| 3444 | body, |
| 3445 | } |
| 3446 | ); |
| 3447 | |
| 3448 | useUsersStore.getState().updateUser(response); |
| 3449 | |
| 3450 | return response; |
| 3451 | } catch (e) { |
| 3452 | errorNotification('Failed to fetch users', e); |
| 3453 | } |
| 3454 | } |
| 3455 | |
| 3456 | static async deleteUser(id) { |
| 3457 | try { |
no test coverage detected