composables, mazani letu, skeletony
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import {defineStore} from 'pinia'
|
||||
import {apolloWrapper} from "src/graphql/apollo";
|
||||
import {COPILOTS_LIST} from "src/graphql/queries/copilots";
|
||||
import {COPILOTS_DETAIL, COPILOTS_LIST} from "src/graphql/queries/copilots";
|
||||
|
||||
export const useCopilotsStore = defineStore('SecondPilots', {
|
||||
state: () => ({
|
||||
@@ -13,6 +13,9 @@ export const useCopilotsStore = defineStore('SecondPilots', {
|
||||
create(formData) {
|
||||
console.log("not implemented");
|
||||
},
|
||||
fetchDetail(copilotId) {
|
||||
return apolloWrapper.query(COPILOTS_DETAIL, {id: copilotId}).then(({data}) => data.copilot);
|
||||
},
|
||||
fetch() {
|
||||
return apolloWrapper.query(COPILOTS_LIST).then(result => {
|
||||
this.items = result.data.copilots;
|
||||
|
||||
Reference in New Issue
Block a user