diff --git a/packages/builder/src/stores/builder/navigation.js b/packages/builder/src/stores/builder/navigation.js index 86e484b0a6..c3e19a4327 100644 --- a/packages/builder/src/stores/builder/navigation.js +++ b/packages/builder/src/stores/builder/navigation.js @@ -35,10 +35,7 @@ export class NavigationStore extends BudiStore { async save(navigation) { const appId = get(appStore).appId - const app = await API.saveAppMetadata({ - appId, - metadata: { navigation }, - }) + const app = await API.saveAppMetadata(appId, { navigation }) this.syncAppNavigation(app.navigation) } diff --git a/packages/builder/src/stores/builder/snippets.js b/packages/builder/src/stores/builder/snippets.js index 72ab274730..d5f9a0b2a8 100644 --- a/packages/builder/src/stores/builder/snippets.js +++ b/packages/builder/src/stores/builder/snippets.js @@ -14,19 +14,13 @@ const createsnippets = () => { ...get(store).filter(snippet => snippet.name !== updatedSnippet.name), updatedSnippet, ] - const app = await API.saveAppMetadata({ - appId: get(appStore).appId, - metadata: { snippets }, - }) + const app = await API.saveAppMetadata(get(appStore).appId, { snippets }) syncMetadata(app) } const deleteSnippet = async snippetName => { const snippets = get(store).filter(snippet => snippet.name !== snippetName) - const app = await API.saveAppMetadata({ - appId: get(appStore).appId, - metadata: { snippets }, - }) + const app = await API.saveAppMetadata(get(appStore).appId, { snippets }) syncMetadata(app) } diff --git a/packages/builder/src/stores/builder/theme.js b/packages/builder/src/stores/builder/theme.js index 8e03e856b3..d6ec643e07 100644 --- a/packages/builder/src/stores/builder/theme.js +++ b/packages/builder/src/stores/builder/theme.js @@ -20,10 +20,7 @@ export const createThemeStore = () => { } const save = async (theme, appId) => { - const app = await API.saveAppMetadata({ - appId, - metadata: { theme }, - }) + const app = await API.saveAppMetadata(appId, { theme }) store.update(state => { state.theme = app.theme return state @@ -32,10 +29,7 @@ export const createThemeStore = () => { const saveCustom = async (theme, appId) => { const updated = { ...get(store).customTheme, ...theme } - const app = await API.saveAppMetadata({ - appId, - metadata: { customTheme: updated }, - }) + const app = await API.saveAppMetadata(appId, { customTheme: updated }) store.update(state => { state.customTheme = app.customTheme return state diff --git a/packages/builder/src/stores/portal/apps.js b/packages/builder/src/stores/portal/apps.js index 60f17da481..c543722604 100644 --- a/packages/builder/src/stores/portal/apps.js +++ b/packages/builder/src/stores/portal/apps.js @@ -128,10 +128,7 @@ export class AppsStore extends BudiStore { } async save(appId, value) { - await API.saveAppMetadata({ - appId, - metadata: value, - }) + await API.saveAppMetadata(appId, value) this.update(state => { const updatedAppIndex = state.apps.findIndex( app => app.instance._id === appId