fix(01): align image upload field name and wrap category delete in transaction
This commit is contained in:
1 parent
950bf2c287
commit
55d47d4e33
2 files changed
+9
-8
No files matched your search
@@ -52,7 +52,7 @@ export async function apiDelete<T>(url: string): Promise<T> {
|
||||
|
||||
export async function apiUpload<T>(url: string, file: File): Promise<T> {
|
||||
const formData = new FormData();
|
||||
formData.append("file", file);
|
||||
formData.append("image", file);
|
||||
const res = await fetch(url, {
|
||||
method: "POST",
|
||||
body: formData,
|
||||
|
||||
Reference in new issue
Block a user