From 4828b1cd30d407c9c8f8a75eabf917b6c7866525 Mon Sep 17 00:00:00 2001 From: Menci Date: Sun, 25 Jun 2017 23:57:46 +0800 Subject: [PATCH] Change API testdata to problem id --- modules/api.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/api.js b/modules/api.js index b7cc274..dc88051 100644 --- a/modules/api.js +++ b/modules/api.js @@ -187,7 +187,7 @@ app.get('/api/waiting_judge', async (req, res) => { have_task: 1, judge_id: judge_state.id, answer_file: judge_state.code, - testdata: judge_state.problem.testdata ? judge_state.problem.testdata.md5 : '', + testdata: judge_state.problem.id, problem_type: judge_state.problem.type }); } else { @@ -196,7 +196,7 @@ app.get('/api/waiting_judge', async (req, res) => { judge_id: judge_state.id, code: judge_state.code, language: judge_state.language, - testdata: judge_state.problem.testdata ? judge_state.problem.testdata.md5 : '', + testdata: judge_state.problem.id, time_limit: judge_state.problem.time_limit, memory_limit: judge_state.problem.memory_limit, file_io: judge_state.problem.file_io,