unclean SPARC
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
/**
|
||||
*
|
||||
*/
|
||||
class ICMPProjectsModel extends EICModel {
|
||||
|
||||
list = [];
|
||||
|
||||
constructor(privileges) { super('/icmp', privileges); }
|
||||
|
||||
/**
|
||||
*
|
||||
* @param {*} node
|
||||
*/
|
||||
get(phase) {
|
||||
if(!this.hasPrivilege('list')) return( new Promise((resolve, reject) => reject()))
|
||||
|
||||
this.list = [];
|
||||
let payload = {}
|
||||
let endpoint = this.getApiEndpoint('list');
|
||||
|
||||
return (
|
||||
this.request(endpoint.uri, endpoint.method, payload)
|
||||
.then( async serverData => {
|
||||
this.list = this.sanitize(serverData.payload);
|
||||
return this.list;
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
sanitize(data) { return data; }
|
||||
}
|
||||
|
||||
app.registerClass('ICMPProjectsModel', ICMPProjectsModel);
|
||||
Reference in New Issue
Block a user