Files
cobaKeuangan/stores/api/sidebar.ts
2025-06-03 10:29:37 +07:00

28 lines
780 B
TypeScript

import axios from 'axios'
import { defineStore } from 'pinia'
// export const useMySidebarStore = defineStore({
// id: 'mySidebarStore',
// state: () => ({ }),
// actions: {}
// })
export const useSidebarStore = defineStore('SidebarStore', () => {
const getSidebar = async () => {
console.log('aaaaa')
const res = await $fetch(`http://10.10.150.131:8080/api/login/6835632801e46cf9c5551876`, {
mode: 'no-cors',
headers: {
'Access-Control-Allow-Origin': '*',
Accept: 'application/json',
'Content-Type': 'application/json',
},
})
.then((response) => {
console.log(response)
})
}
return {
getSidebar
}
})