Дополнительные проверки в API

remotes/origin/hasaccess
Vitaly Baev 8 years ago
parent c9f0e3e33d
commit 465a927b96
  1. 4
      web/src/js/modules/api.js

@ -238,8 +238,8 @@ export const api = {
id: courseJSON.id,
title: courseJSON.title,
short_description: courseJSON.short_description,
category: courseJSON.category.id ? courseJSON.category.id : courseJSON.category,
author: courseJSON.author.id ? courseJSON.author.id : courseJSON.author,
category: courseJSON.category && courseJSON.category.id ? courseJSON.category.id : courseJSON.category,
author: courseJSON.author && courseJSON.author.id ? courseJSON.author.id : courseJSON.author,
price: parseFloat(courseJSON.price),
is_paid: parseFloat(courseJSON.price) > 0,
is_deferred: isDeferred,

Loading…
Cancel
Save