kf save almost good
This commit is contained in:
@@ -5,7 +5,21 @@ class KeyframesModel extends WindozModel {
|
||||
this.ressource = '/keyframes'
|
||||
}
|
||||
|
||||
async save(data) {
|
||||
async create(kfData, prevKFId) {
|
||||
let endpoint = {...app.config.api[this.ressource].create}
|
||||
return (
|
||||
this.request(endpoint.uri, endpoint.method, kfData)
|
||||
)
|
||||
}
|
||||
|
||||
async rename(kfData, prevKFId) {
|
||||
let endpoint = {...app.config.api[this.ressource].create}
|
||||
return (
|
||||
this.request(endpoint.uri, endpoint.method, kfData)
|
||||
)
|
||||
}
|
||||
|
||||
async save(kfId, data) {
|
||||
const kfData = Object.keys(data).map(aid => {
|
||||
const { position, speed, ...storeValues} = data[aid].values
|
||||
return({
|
||||
@@ -15,9 +29,8 @@ class KeyframesModel extends WindozModel {
|
||||
})
|
||||
})
|
||||
|
||||
let endpoint = {...app.config.api[this.ressource].getTypes}
|
||||
endpoint.uri = endpoint.uri.replace('{family}', data.kfId || '')
|
||||
const aid = Object.keys(x)[data]
|
||||
let endpoint = {...app.config.api[this.ressource].saveAgents}
|
||||
endpoint.uri = endpoint.uri.replace('{kfId}', kfId)
|
||||
return (
|
||||
this.request(endpoint.uri, endpoint.method, kfData)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user