dev_forum
SylorHuang 6 years ago
parent 71ea32797d
commit 226afa2d96

@ -27,12 +27,17 @@ json.shixun_detail do
json.output_detail output_detail game, output
end
if game.try(:lastest_code).blank?
cha_path = challenge_path(shixun_challenge.challenge&.path)
latest_code = git_fle_content(shixun_challenge.shixun&.repo_path,cha_path)
if game.evaluate_count > 0
if game.try(:lastest_code).blank?
cha_path = challenge_path(shixun_challenge.challenge&.path)
latest_code = git_fle_content(shixun_challenge.shixun&.repo_path,cha_path)
else
latest_code = game.try(:lastest_code)
end
else
latest_code = game.try(:lastest_code)
latest_code = nil
end
json.passed_code latest_code
end
end
Loading…
Cancel
Save