Skip to content

Commit 7348624

Browse files
authored
Merge pull request #4 from acceleratedscience/wip
Moved API segments to @/api
2 parents 82dfc44 + 53dd76d commit 7348624

29 files changed

Lines changed: 35 additions & 35 deletions

src/App.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const commandLineStore = useCommandLineStore()
7777
const assistantStore = useAssistantStore()
7878
7979
// API
80-
import { fileSystemApi } from '@/api/ApiService'
80+
import { fileSystemApi } from '@/api'
8181
// import webSocketClient from '@/api/WebSocketClient'// Experimental
8282
// webSocketClient()
8383
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import type { Ref } from 'vue'
22
// import domLog from '@/utils/dom-log'
33

4-
import FileSystemApi from '@/api/FileSystemApi'
5-
import MoleculesApi from '@/api/MoleculesApi'
6-
import MainApi from '@/api/MainApi'
7-
import ResultApi from '@/api/ResultApi'
8-
import DataframeApi from '@/api/DataframeApi'
4+
import FileSystemApi from '@/api/segments/FileSystemApi'
5+
import MoleculesApi from '@/api/segments/MoleculesApi'
6+
import MainApi from '@/api/segments/MainApi'
7+
import ResultApi from '@/api/segments/ResultApi'
8+
import DataframeApi from '@/api/segments/DataframeApi'
99

1010
export const fileSystemApi = new FileSystemApi()
1111
export const moleculesApi = new MoleculesApi()
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
API calls should be implementyed as such:
22

33
// API
4-
import { apiFetch, generalApi } from '@/api/ApiService'
4+
import { apiFetch, generalApi } from '@/api'
55

66
// Definitions
77
const loading = ref<boolean>(false)
88
const loadingError = ref<string | null>(null)
99
const status = ref<number | null>(null)
1010

1111
const filePath: string = route.path.replace(/(^\/headless)?\/~(\/)?/, '')
12-
12+
1313
apiFetch(generalApi.fetchFoobar(param1, param2), {
1414
onSuccess: (response) => {
1515
//
@@ -21,9 +21,9 @@ API calls should be implementyed as such:
2121
loadingError,
2222
status,
2323

24-
// When called from within Pinia, we use
24+
// When called from within Pinia, we use
2525
// callback functions instead of references.
2626
setLoading: this.setLoading,
27-
setLoadingError: this.setLoadingError,
28-
setStatus: this.setStatus,
29-
})
27+
setLoadingError: this.setLoadingError,
28+
setStatus: this.setStatus,
29+
})

src/components/BaseBookmark.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
import { watch, onMounted, ref } from 'vue'
1717
1818
// API
19-
import { apiFetch, moleculesApi } from '@/api/ApiService'
19+
import { apiFetch, moleculesApi } from '@/api'
2020
2121
// Components
2222
import BaseIconButtonToggle from '@/components/BaseIconButtonToggle.vue'

0 commit comments

Comments
 (0)