diff --git a/app/views/challenges/edit.json.jbuilder b/app/views/challenges/edit.json.jbuilder index 5ae15cf67..3e7f5b425 100644 --- a/app/views/challenges/edit.json.jbuilder +++ b/app/views/challenges/edit.json.jbuilder @@ -16,7 +16,7 @@ elsif @tab == 1 json.has_web_route @shixun.has_web_route? json.test_sets @challenge.test_sets do |set| json.hidden (set.is_public ? 0 : 1) - json.(set, :input, :output, :score) + json.(set, :input, :output, :score, :match_rule) end elsif @tab == 2 # 参考答案 diff --git a/app/views/shixuns/settings.json.jbuilder b/app/views/shixuns/settings.json.jbuilder index ad29f4176..c9142dab0 100644 --- a/app/views/shixuns/settings.json.jbuilder +++ b/app/views/shixuns/settings.json.jbuilder @@ -30,6 +30,8 @@ json.shixun do json.scope_partment @shixun.schools.map(&:name) # 公开范围 json.opening_time @shixun.opening_time json.forbid_copy @shixun.forbid_copy + # 私密仓库 + json.is_secret_repository @shixun.shixun_secret_repository.present? # 实训服务配置 json.shixun_service_configs do diff --git a/app/views/shixuns/show.json.jbuilder b/app/views/shixuns/show.json.jbuilder index 8e49a99f4..57ea305ed 100644 --- a/app/views/shixuns/show.json.jbuilder +++ b/app/views/shixuns/show.json.jbuilder @@ -2,3 +2,4 @@ json.fork_from @fork_from json.identity User.current.shixun_identity(@shixun) json.power @power json.partial! 'shixuns/top', locals: { shixun: @shixun, current_myshixun: @current_myshixun } +json.secret_repositoy @shixun.shixun_secret_repository.present?