feat: auth flow, categories list t0

This commit is contained in:
Florian Sylvain
2024-10-10 21:24:58 +02:00
parent f8a75e9cdd
commit 81bc46ebfa
9 changed files with 139 additions and 47 deletions
+12
View File
@@ -0,0 +1,12 @@
import { useApi } from '@/composables/api'
import { defineStore } from 'pinia'
export const useCategoriesStore = defineStore('categories', () => {
const api = useApi()
const getCategories = async () => {
return await fetch(`${api.url}/category`, api.options)
}
return { getCategories }
})