diff --git a/app/views/weapps/subjects/index.json.jbuilder b/app/views/weapps/subjects/index.json.jbuilder index cfdce4530..fd12827b0 100644 --- a/app/views/weapps/subjects/index.json.jbuilder +++ b/app/views/weapps/subjects/index.json.jbuilder @@ -1,6 +1,7 @@ json.subjects @subjects do |subject| json.(subject, :id, :excellent, :name, :stages_count, :shixuns_count) json.myshixuns_count subject.member_count + json.challenges_count subject.subject_challenge_count json.image_url url_to_avatar(subject) json.allow_visit subject.status > 1 || User.current.manager_of_subject?(subject) || User.current.admin? end diff --git a/app/views/weapps/subjects/show.json.jbuilder b/app/views/weapps/subjects/show.json.jbuilder index 757257e82..29a30a89a 100644 --- a/app/views/weapps/subjects/show.json.jbuilder +++ b/app/views/weapps/subjects/show.json.jbuilder @@ -2,6 +2,7 @@ json.subject do json.name @subject.name json.description @subject.description json.shixuns_count @subject.shixuns_count + json.challenges_count @subject.subject_challenge_count json.member_count @subject.member_count json.subject_score @subject.all_score json.learning_notes @subject.learning_notes