|
|
|
|
@ -64,6 +64,7 @@ export const api = { |
|
|
|
|
|
|
|
|
|
const courseJson = { |
|
|
|
|
title: courseObject.title, |
|
|
|
|
status: courseObject.status, |
|
|
|
|
author: courseObject.author ? courseObject.author : null, |
|
|
|
|
short_description: courseObject.short_description, |
|
|
|
|
category: courseObject.category, |
|
|
|
|
@ -238,7 +239,7 @@ export const api = { |
|
|
|
|
return { |
|
|
|
|
id: courseJSON.id, |
|
|
|
|
title: courseJSON.title, |
|
|
|
|
author: courseJSON.author, |
|
|
|
|
status: courseJSON.status, |
|
|
|
|
short_description: courseJSON.short_description, |
|
|
|
|
category: courseJSON.category && courseJSON.category.id ? courseJSON.category.id : courseJSON.category, |
|
|
|
|
author: courseJSON.author && courseJSON.author.id ? courseJSON.author.id : courseJSON.author, |
|
|
|
|
|