refactor: img dialog => remove img function

This commit is contained in:
puriphatt 2024-09-12 16:41:09 +07:00
parent 42bb43f618
commit 7ab9f69ef8
6 changed files with 82 additions and 78 deletions

View file

@ -586,12 +586,12 @@ const useProductServiceStore = defineStore('api-product-service', () => {
async function addImageList(
file: File,
userId: string,
id: string,
name: string,
type: 'product' | 'service',
) {
await api
.put(`/${type}/${userId}/image/${name}`, file, {
.put(`/${type}/${id}/image/${name}`, file, {
headers: { 'Content-Type': file.type },
onUploadProgress: (e) => console.log(e),
})