mirror of
https://github.com/rzmk/learnhouse.git
synced 2025-12-19 04:19:25 +00:00
feat: make some courses inputs optional
This commit is contained in:
parent
8ad2533058
commit
513d65704f
8 changed files with 40 additions and 15 deletions
|
|
@ -45,7 +45,10 @@ export async function createNewCourse(org_id: string, course_body: any, thumbnai
|
|||
formData.append("learnings", course_body.tags);
|
||||
formData.append("tags", course_body.tags);
|
||||
formData.append("about", course_body.description);
|
||||
formData.append("thumbnail", thumbnail);
|
||||
|
||||
if (thumbnail) {
|
||||
formData.append("thumbnail", thumbnail);
|
||||
}
|
||||
|
||||
const result = await fetch(`${getAPIUrl()}courses/?org_id=${org_id}`, RequestBodyForm("POST", formData, null));
|
||||
const res = await errorHandling(result);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue