Browse Source

bugfix: workflow still passing instanceId to api()

pull/368/head
Michael Shanks 6 years ago
parent
commit
e4c19bd9fd
  1. 4
      packages/builder/src/builderStore/store/workflow/index.js
  2. 2
      packages/builder/src/components/workflow/WorkflowPanel/WorkflowList/WorkflowList.svelte

4
packages/builder/src/builderStore/store/workflow/index.js

@ -3,9 +3,9 @@ import api from "../../api"
import Workflow from "./Workflow" import Workflow from "./Workflow"
const workflowActions = store => ({ const workflowActions = store => ({
fetch: async instanceId => { fetch: async () => {
const WORKFLOWS_URL = `/api/workflows` const WORKFLOWS_URL = `/api/workflows`
const workflowResponse = await api(instanceId).get(WORKFLOWS_URL) const workflowResponse = await api.get(WORKFLOWS_URL)
const json = await workflowResponse.json() const json = await workflowResponse.json()
store.update(state => { store.update(state => {
state.workflows = json state.workflows = json

2
packages/builder/src/components/workflow/WorkflowPanel/WorkflowList/WorkflowList.svelte

@ -22,7 +22,7 @@
} }
onMount(() => { onMount(() => {
workflowStore.actions.fetch($backendUiStore.selectedDatabase._id) workflowStore.actions.fetch()
}) })
</script> </script>

Loading…
Cancel
Save