Add package updates, car updates, and vehicle screens (#25)
This commit is contained in:
@@ -29,5 +29,15 @@ export const uploadFile = (file, data, token, onProgress, cancelToken) => {
|
||||
form.append(key, data[key]);
|
||||
}
|
||||
form.append("file", file);
|
||||
return axios.post(`${UPLOAD_ENDPOINT}/upload`, form, options);
|
||||
return axios.post(`${UPLOAD_ENDPOINT}/update`, form, options)
|
||||
.then((response) => response.data)
|
||||
.catch((error) => {
|
||||
if (typeof error.response.data === "string") {
|
||||
return {
|
||||
error: error.response.statusText,
|
||||
message: error.response.data,
|
||||
};
|
||||
}
|
||||
return error.response.data;
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user