images
This commit is contained in:
@@ -93,6 +93,19 @@ export const api = {
|
||||
}
|
||||
return json.data;
|
||||
},
|
||||
async getFileContentBlob(token: string, fileId: string) {
|
||||
const response = await fetch(`/api/v1/files/${fileId}/content`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${token}`,
|
||||
},
|
||||
});
|
||||
|
||||
if (!response.ok) {
|
||||
throw new ApiError("Unable to load file content.", "FILE_CONTENT_FAILED");
|
||||
}
|
||||
|
||||
return response.blob();
|
||||
},
|
||||
getCustomers(token: string, filters?: { q?: string; status?: CrmRecordStatus; state?: string }) {
|
||||
return request<CrmRecordSummaryDto[]>(
|
||||
`/api/v1/crm/customers${buildQueryString({
|
||||
|
||||
Reference in New Issue
Block a user