moved get merch list method
This commit is contained in:
parent
bd25bc90cf
commit
8b747f0a1e
2 changed files with 16 additions and 2 deletions
|
|
@ -2,15 +2,17 @@
|
|||
import CollectionToolbar from '@/views/CollectionView/CollectionToolbar.vue'
|
||||
import CollectionMerchCard from '@/views/CollectionView/CollectionMerchCard.vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { apiClient } from '@/services/apiClient.js'
|
||||
import { useMerchApi } from '@/api/merch.js'
|
||||
|
||||
const merchList = ref(null)
|
||||
const loading = ref(true)
|
||||
const error = ref(null)
|
||||
|
||||
const { getMerchList } = useMerchApi()
|
||||
|
||||
const fetchMerch = async () => {
|
||||
try {
|
||||
const response = await apiClient.get('/merch/')
|
||||
const response = await getMerchList()
|
||||
if (!response.ok) throw new Error('Network error')
|
||||
merchList.value = await response.data
|
||||
} catch (err) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue