update origin link component
This commit is contained in:
parent
60e1abc941
commit
2249775e2a
3 changed files with 160 additions and 3 deletions
|
|
@ -41,10 +41,20 @@ export const useMerchApi = () => {
|
|||
}
|
||||
}
|
||||
|
||||
const updateMerch = async (payload) => {
|
||||
const response = await apiClient.put(`/merch/`, payload)
|
||||
if (response.status === 200) {
|
||||
return response
|
||||
} else {
|
||||
console.log('Update merch error: ', response)
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
addMerch,
|
||||
getMerchDetails,
|
||||
getMerchList,
|
||||
deleteMerch,
|
||||
updateMerch,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue