From e884c200eb6d2c2d9a44e397d8a7cb31d445f2e9 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Tue, 7 Jan 2020 17:07:49 +0800 Subject: [PATCH] 1 --- app/views/hack_user_lastest_codes/result.json.jbuilder | 1 + app/views/hack_user_lastest_codes/show.json.jbuilder | 1 + 2 files changed, 2 insertions(+) diff --git a/app/views/hack_user_lastest_codes/result.json.jbuilder b/app/views/hack_user_lastest_codes/result.json.jbuilder index d8f010cc3..0ddd28103 100644 --- a/app/views/hack_user_lastest_codes/result.json.jbuilder +++ b/app/views/hack_user_lastest_codes/result.json.jbuilder @@ -3,6 +3,7 @@ json.message "评测完成" json.data do json.(@result, :id, :status, :error_line, :error_msg, :input, :output, :execute_time, :execute_memory) + json.passed @my_hack.passed # 提交模式多了一个预计输出 if @mode == "submit" json.expected_output @result.expected_output diff --git a/app/views/hack_user_lastest_codes/show.json.jbuilder b/app/views/hack_user_lastest_codes/show.json.jbuilder index 04b066aa0..4dd023296 100644 --- a/app/views/hack_user_lastest_codes/show.json.jbuilder +++ b/app/views/hack_user_lastest_codes/show.json.jbuilder @@ -8,6 +8,7 @@ json.hack do json.submit_count @hack.submit_num json.notes @my_hack.notes json.modify_code @modify + json.passed @my_hack.passed json.comments_count @hack.discusses.count json.user_praise @hack.praise_treads.select{|pt| pt.user_id == current_user.id}.length > 0 end