From 91dfc94a7bec3cbfd8483419bd77dcf3ac5b9e93 Mon Sep 17 00:00:00 2001 From: yystopf Date: Thu, 6 Apr 2023 17:13:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=EF=BC=9A=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=AD=A3=E5=B8=B8=E6=98=BE=E7=A4=BAresponse=5Fcontent?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/api/v1/projects/webhooks/hooktasks.json.jbuilder | 2 +- app/views/projects/webhooks/tasks.json.jbuilder | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/api/v1/projects/webhooks/hooktasks.json.jbuilder b/app/views/api/v1/projects/webhooks/hooktasks.json.jbuilder index 618a05515..22070cc68 100644 --- a/app/views/api/v1/projects/webhooks/hooktasks.json.jbuilder +++ b/app/views/api/v1/projects/webhooks/hooktasks.json.jbuilder @@ -1,6 +1,6 @@ json.total_count @hooktasks.total_count json.hooktasks @hooktasks.each do |task| json.(task, :id, :event_type, :type, :uuid, :is_succeed, :is_delivered, :payload_content, :request_content) - json.response_content task.response_content_json + json.response_content task.response_content json.delivered_time Time.at(task.delivered*10**-9).strftime("%Y-%m-%d %H:%M:%S") end \ No newline at end of file diff --git a/app/views/projects/webhooks/tasks.json.jbuilder b/app/views/projects/webhooks/tasks.json.jbuilder index 82b2eae4a..8e1809011 100644 --- a/app/views/projects/webhooks/tasks.json.jbuilder +++ b/app/views/projects/webhooks/tasks.json.jbuilder @@ -1,6 +1,6 @@ json.total_count @tasks.total_count json.tasks @tasks.each do |task| json.(task, :id, :event_type, :type, :uuid, :is_succeed, :is_delivered, :payload_content, :request_content) - json.response_content task.response_content_json - json.delivered_time Time.at(task.delivered*10**-9).strftime("%Y-%m-%d %H:%M:%S") + json.response_content task.response_content + json.delivered_time task.delivered.present? ? Time.at(task.delivered*10**-9).strftime("%Y-%m-%d %H:%M:%S") : nil end \ No newline at end of file