sim creation wired to DB with ownership

This commit is contained in:
STEINNI
2026-06-05 20:27:57 +00:00
parent b122cf153e
commit d172e06611
4 changed files with 62 additions and 15 deletions
+23 -10
View File
@@ -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)
)
}
}