Skip to content

Commit c8a1fef

Browse files
authored
new methods
1 parent 2f50299 commit c8a1fef

1 file changed

Lines changed: 27 additions & 0 deletions

File tree

index.js

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,31 @@ module.exports = class FastPanel {
5454
reject(res)
5555
});
5656
}
57+
58+
settings() {
59+
return new Promise(async (resolve, reject) => {
60+
const res = await this._get('api/settings');
61+
if(res) resolve(res);
62+
63+
reject(res)
64+
});
65+
}
66+
67+
users() {
68+
return new Promise(async (resolve, reject) => {
69+
const res = await this._get('api/users');
70+
if(res) resolve(res);
71+
72+
reject(res)
73+
});
74+
}
75+
76+
user(id) {
77+
return new Promise(async (resolve, reject) => {
78+
const res = await this._get(`api/users/${id}`);
79+
if(res) resolve(res);
80+
81+
reject(res)
82+
});
83+
}
5784
}

0 commit comments

Comments
 (0)