import {defineStore} from "pinia"; import axios from "axios"; export const useScheduleStore = defineStore('schedule', { state: () => ({ dates: Object, links: Object, schedules: Object }), getters: { }, actions: { async getDates(){ await axios .get('/api/v1/dates') .then((response) => { this.dates = response.data; }); }, async getLinks(){ await axios .get('/api/v1/links') .then((response)=>{ this.links = response.data; }) }, async getSchedules(){ await axios .get('/api/v1/schedules') .then((response)=>{ this.schedules = response.data; }) } }, })