agents defs from DB
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
class AgentsModel extends EICModel {
|
||||
|
||||
constructor() {
|
||||
super()
|
||||
this.ressource = '/agents'
|
||||
}
|
||||
|
||||
async getSprites(group) {
|
||||
let endpoint = app.config.api[this.ressource].getSprites
|
||||
endpoint.uri = endpoint.uri.replace('{group}', group)
|
||||
return (
|
||||
this.request(endpoint.uri, endpoint.method)
|
||||
.then( async serverData => serverData.payload.agentSprites)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
app.registerClass('AgentsModel', AgentsModel);
|
||||
Reference in New Issue
Block a user