mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
fix: tag color bug, FormData interceptor, falsy id check
- Fix tag using category_color instead of its own color when editing - Add FormData auto-detection interceptor in client.ts (root cause of 422) - Remove redundant Content-Type overrides from all 5 upload endpoints - Fix falsy id check (id: 0 treated as null) with strict comparison - Await invalidateQueries to prevent stale dropdown data
This commit is contained in:
@@ -153,11 +153,7 @@ export const brandingApi = {
|
||||
uploadLogo: async (file: File): Promise<BrandingInfo> => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', file);
|
||||
const response = await apiClient.post<BrandingInfo>('/cabinet/branding/logo', formData, {
|
||||
headers: {
|
||||
'Content-Type': 'multipart/form-data',
|
||||
},
|
||||
});
|
||||
const response = await apiClient.post<BrandingInfo>('/cabinet/branding/logo', formData);
|
||||
// Invalidate cached blob so it gets re-fetched
|
||||
if (_logoBlobUrl) {
|
||||
URL.revokeObjectURL(_logoBlobUrl);
|
||||
|
||||
Reference in New Issue
Block a user