edit: response.message
This commit is contained in:
parent
d7f824f353
commit
7de5457170
21 changed files with 227 additions and 127 deletions
|
|
@ -214,14 +214,18 @@ export const instructorService = {
|
|||
}
|
||||
|
||||
// Clean data - remove empty thumbnail_url
|
||||
|
||||
const cleanedData = { ...data };
|
||||
if (!cleanedData.thumbnail_url) {
|
||||
delete cleanedData.thumbnail_url;
|
||||
}
|
||||
|
||||
const formData = new FormData();
|
||||
formData.append('data', JSON.stringify(cleanedData));
|
||||
|
||||
return await authRequest<ApiResponse<CourseResponse>>('/api/instructors/courses', {
|
||||
method: 'POST',
|
||||
body: cleanedData
|
||||
body: formData
|
||||
});
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue