Skip to content

Commit d463cbf

Browse files
authored
added delete function
1 parent 5e98acc commit d463cbf

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

index.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ module.exports = class FastPanel {
4646
});
4747
}
4848

49+
_delete(route) {
50+
return new Promise(async (resolve, reject) => {
51+
const res = await axios.delete(`${this.url}/${route}`, {
52+
headers: {
53+
Authorization: `Bearer ${this.token}`
54+
}
55+
});
56+
57+
resolve(res.data);
58+
});
59+
}
60+
4961
me() {
5062
return new Promise(async (resolve, reject) => {
5163
const res = await this._get('api/me');

0 commit comments

Comments
 (0)