lint ✨
This commit is contained in:
parent
63fc10e1e0
commit
fb382329b8
|
@ -1,7 +1,6 @@
|
|||
import { writable } from "svelte/store"
|
||||
import { cloneDeep } from "lodash/fp"
|
||||
import api from "../api"
|
||||
import { update } from "lodash"
|
||||
|
||||
export const getBackendUiStore = () => {
|
||||
const INITIAL_BACKEND_UI_STATE = {
|
||||
|
@ -82,7 +81,7 @@ export const getBackendUiStore = () => {
|
|||
}
|
||||
|
||||
const SAVE_MODEL_URL = `/api/models`
|
||||
console.log(updatedModel);
|
||||
console.log(updatedModel)
|
||||
const response = await api.post(SAVE_MODEL_URL, updatedModel)
|
||||
const savedModel = await response.json()
|
||||
await store.actions.models.fetch()
|
||||
|
|
|
@ -28,8 +28,8 @@ exports.save = async function(ctx) {
|
|||
const { _rename } = modelToSave
|
||||
if (_rename) {
|
||||
const records = await db.query(`database/all_${modelToSave._id}`, {
|
||||
include_docs: true
|
||||
});
|
||||
include_docs: true,
|
||||
})
|
||||
const docs = records.rows.map(({ doc }) => {
|
||||
doc[_rename.updated] = doc[_rename.old]
|
||||
delete doc[_rename.old]
|
||||
|
@ -55,7 +55,7 @@ exports.save = async function(ctx) {
|
|||
modelId: modelToSave._id,
|
||||
constraints: {
|
||||
type: "array",
|
||||
}
|
||||
},
|
||||
}
|
||||
await db.put(linkedModel)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue