1
0
mirror of https://gitlab.com/bramw/baserow.git synced 2024-11-21 23:37:55 +00:00
bramw_baserow/web-frontend/modules/builder/store/publicBuilder.js

34 lines
713 B
JavaScript

import PublishedBuilderService from '@baserow/modules/builder/services/publishedBuilder'
const state = {}
const mutations = {}
const actions = {
async fetchById({ dispatch }, { builderId }) {
const { data } = await PublishedBuilderService(this.$client).fetchById(
builderId
)
return await dispatch('application/forceCreate', data, { root: true })
},
async fetchByDomain({ dispatch }, { domain }) {
const { data } = await PublishedBuilderService(this.$client).fetchByDomain(
domain
)
return await dispatch('application/forceCreate', data, { root: true })
},
}
const getters = {}
export default {
namespaced: true,
state,
getters,
actions,
mutations,
}