sim creation wired to DB with ownership
This commit is contained in:
+23
-10
@@ -6,28 +6,41 @@ class SimsModel extends WindozModel {
|
||||
}
|
||||
|
||||
async list() {
|
||||
// TODO: implement
|
||||
return([])
|
||||
let endpoint = {...app.config.api[this.ressource].list}
|
||||
return(
|
||||
this.request(endpoint.uri, endpoint.method)
|
||||
)
|
||||
}
|
||||
|
||||
async get(simId) {
|
||||
// TODO: implement
|
||||
return(null)
|
||||
let endpoint = {...app.config.api[this.ressource].get}
|
||||
endpoint.uri = endpoint.uri.replace('{simId}', simId)
|
||||
return(
|
||||
this.request(endpoint.uri, endpoint.method)
|
||||
)
|
||||
}
|
||||
|
||||
async create(simData) {
|
||||
// TODO: implement
|
||||
return(null)
|
||||
let endpoint = {...app.config.api[this.ressource].create}
|
||||
return(
|
||||
this.request(endpoint.uri, endpoint.method, simData)
|
||||
)
|
||||
}
|
||||
|
||||
async start(simId) {
|
||||
// TODO: implement
|
||||
return(null)
|
||||
let endpoint = {...app.config.api[this.ressource].start}
|
||||
endpoint.uri = endpoint.uri.replace('{simId}', simId)
|
||||
return(
|
||||
this.request(endpoint.uri, endpoint.method)
|
||||
)
|
||||
}
|
||||
|
||||
async pause(simId) {
|
||||
// TODO: implement
|
||||
return(null)
|
||||
let endpoint = {...app.config.api[this.ressource].pause}
|
||||
endpoint.uri = endpoint.uri.replace('{simId}', simId)
|
||||
return(
|
||||
this.request(endpoint.uri, endpoint.method)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user