Browse Source

修复:无法正常显示response_content

pull/342/head
yystopf 3 years ago
parent
commit
91dfc94a7b
2 changed files with 3 additions and 3 deletions
  1. +1
    -1
      app/views/api/v1/projects/webhooks/hooktasks.json.jbuilder
  2. +2
    -2
      app/views/projects/webhooks/tasks.json.jbuilder

+ 1
- 1
app/views/api/v1/projects/webhooks/hooktasks.json.jbuilder View File

@@ -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

+ 2
- 2
app/views/projects/webhooks/tasks.json.jbuilder View File

@@ -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

Loading…
Cancel
Save