Skip to content

Commit 4415a1a

Browse files
Merge pull request #7 from BreakOutEvent/feature/add-admin-and-swappasswords-endpoints
Feature/add admin and swappasswords endpoints
2 parents bc11b33 + 9ffc813 commit 4415a1a

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "breakout-api-client",
3-
"version": "0.16.4",
3+
"version": "0.17.0",
44
"description": "A JS Api client for the breakout-backend",
55
"main": "src/BreakoutApi.js",
66
"directories": {

src/BreakoutApi.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -505,6 +505,22 @@ 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);
510+
}
511+
512+
removeAdmin(userId) {
513+
return this.instance.delete(`/admin/user/${userId}/admin/`).then(resp => resp.data);
514+
}
515+
516+
swapPasswords(userId) {
517+
return this.instance.post(`/admin/user/${userId}/swappasswords/`).then(resp => resp.data);
518+
}
519+
520+
cloneSettings(debug=false) {
521+
return new BreakoutApi(this.url, this.clientId, this.clientSecret, this.cloudinaryCloud, this.cloudinaryApiKey, debug);
522+
}
523+
508524
}
509525

510526
module.exports = BreakoutApi;

0 commit comments

Comments
 (0)