storeManagement contentmanagement edit
This commit is contained in:
parent
50715feb94
commit
94d930e5aa
@ -148,10 +148,14 @@ export const useStoreStore = defineStore('store', {
|
|||||||
},
|
},
|
||||||
|
|
||||||
actions: {
|
actions: {
|
||||||
|
setStoreInfo(storeInfo) {
|
||||||
|
this.storeInfo = storeInfo
|
||||||
|
},
|
||||||
|
|
||||||
async fetchStoreInfo() {
|
async fetchStoreInfo() {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const response = await storeService.getStoreInfo()
|
const response = await storeService.getStore() // getStoreInfo가 아닌 getStore
|
||||||
this.storeInfo = response.data
|
this.storeInfo = response.data
|
||||||
return response
|
return response
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
@ -161,10 +165,23 @@ export const useStoreStore = defineStore('store', {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
async updateStoreInfo(storeData) {
|
async registerStore(storeData) {
|
||||||
try {
|
try {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
const response = await storeService.updateStoreInfo(storeData)
|
const response = await storeService.registerStore(storeData)
|
||||||
|
this.storeInfo = response.data
|
||||||
|
return response
|
||||||
|
} catch (error) {
|
||||||
|
throw error
|
||||||
|
} finally {
|
||||||
|
this.loading = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
async updateStore(storeId, storeData) {
|
||||||
|
try {
|
||||||
|
this.loading = true
|
||||||
|
const response = await storeService.updateStore(storeId, storeData)
|
||||||
this.storeInfo = response.data
|
this.storeInfo = response.data
|
||||||
return response
|
return response
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user