Skip to content

Commit b1c6726

Browse files
Allowing to set other roles as admin
1 parent e16aad5 commit b1c6726

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/BreakoutApi.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -505,12 +505,12 @@ class BreakoutApi {
505505
.then(resp => resp.data);
506506
}
507507

508-
makeAdmin(userId) {
509-
return this.instance.post(`/admin/user/${userId}/admin/`).then(resp => resp.data);
508+
makeAdmin(userId, authority) {
509+
return this.instance.post(`/admin/user/${userId}/admin/?authority=${authority}`).then(resp => resp.data);
510510
}
511511

512-
removeAdmin(userId) {
513-
return this.instance.delete(`/admin/user/${userId}/admin/`).then(resp => resp.data);
512+
removeAdmin(userId, authority) {
513+
return this.instance.delete(`/admin/user/${userId}/admin/?authority=${authority}`).then(resp => resp.data);
514514
}
515515

516516
swapPasswords(userId) {

0 commit comments

Comments
 (0)