Fix DELETE sending empty JSON body, add repair_note to allowed file entity types
API client no longer sets Content-Type: application/json on requests without a body (fixes DELETE 400 errors). Added repair_note to the allowed entityTypes whitelist for file uploads so photos can be attached to repair notes.
This commit is contained in:
@@ -15,8 +15,10 @@ class ApiError extends Error {
|
||||
async function request<T>(method: string, path: string, body?: unknown): Promise<T> {
|
||||
const { token } = useAuthStore.getState()
|
||||
|
||||
const headers: Record<string, string> = {
|
||||
'Content-Type': 'application/json',
|
||||
const headers: Record<string, string> = {}
|
||||
|
||||
if (body) {
|
||||
headers['Content-Type'] = 'application/json'
|
||||
}
|
||||
|
||||
if (token) {
|
||||
|
||||
Reference in New Issue
Block a user