|
@@ -2,11 +2,10 @@ import axios from "axios";
|
|
|
import { apiUrl } from "@/env";
|
|
|
import type { IUserProfile, IUserProfileUpdate, IUserProfileCreate, IUserProfileRegister } from "@/interfaces";
|
|
|
|
|
|
-function authHeaders(token: string, contentType:string="application/json") {
|
|
|
+function authHeaders(token: string) {
|
|
|
return {
|
|
|
headers: {
|
|
|
Authorization: `Bearer ${token}`,
|
|
|
- "Content-Type": contentType,
|
|
|
},
|
|
|
};
|
|
|
}
|
|
@@ -56,6 +55,6 @@ export const api = {
|
|
|
async testCeleryFile(token: string, file: File){
|
|
|
const formData = new FormData();
|
|
|
formData.append("file", file)
|
|
|
- return axios.post<{msg:string}>(`${apiUrl}/api/v1/utils/test-celery/file`, formData, authHeaders(token, "maltipart/form-data"));
|
|
|
+ return axios.post<{msg:string}>(`${apiUrl}/api/v1/utils/test-celery/file`, formData, authHeaders(token));
|
|
|
},
|
|
|
};
|