This commit is contained in:
parent
0e51451ad2
commit
2b08889218
1 changed files with 2 additions and 2 deletions
|
|
@ -34,7 +34,7 @@ export const useLabelsStore = defineStore('labels', () => {
|
||||||
|
|
||||||
const getLabels = async () => {
|
const getLabels = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await apiClient.get('/merch/labels')
|
const response = await apiClient.get(`/merch/labels?_=${Date.now()}`)
|
||||||
const labelList = Array.isArray(response.data) ? response.data : []
|
const labelList = Array.isArray(response.data) ? response.data : []
|
||||||
labels.value = labelList
|
labels.value = labelList
|
||||||
localStorage.setItem('labels', JSON.stringify(labelList))
|
localStorage.setItem('labels', JSON.stringify(labelList))
|
||||||
|
|
@ -46,7 +46,7 @@ export const useLabelsStore = defineStore('labels', () => {
|
||||||
|
|
||||||
const updateLabel = async (uuid, updatedData) => {
|
const updateLabel = async (uuid, updatedData) => {
|
||||||
try {
|
try {
|
||||||
await apiClient.put(`/merch/labels/${uuid}`, updatedData)
|
await apiClient.put(`/merch/labels/${uuid}?_=${Date.now()}`, updatedData)
|
||||||
await getLabels()
|
await getLabels()
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Failed to update label:', error)
|
console.error('Failed to update label:', error)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue