Browse Source

更改:events返回数据处理

pull/343/head
yystopf 3 years ago
parent
commit
ccede16716
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/views/api/v1/projects/webhooks/_simple_gitea_detail.json.jbuilder
  2. +1
    -1
      app/views/projects/webhooks/create.json.jbuilder

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

@@ -3,7 +3,7 @@ json.type webhook["type"]
json.content_type webhook['config']['content_type']
json.http_method webhook['config']['http_method']
json.url webhook['config']['url']
json.events webhook["events"]
json.events webhook["events"].collect{|i| %w(pull_request issues).include?(i) ? i + "_only" : i}
json.active webhook['active']
json.branch_filter webhook['branch_filter']
json.created_at format_time(webhook['created_at'].to_time)

+ 1
- 1
app/views/projects/webhooks/create.json.jbuilder View File

@@ -2,6 +2,6 @@ json.id @webhook["id"]
json.type @webhook["type"]
json.content_type @webhook["config"]["content_type"]
json.url @webhook["config"]["url"]
json.events @webhook["events"]
json.events @webhook["events"].collect{|i| %w(pull_request issues).include?(i) ? i + "_only" : i}
json.active @webhook["active"]
json.create_time @webhook["created_at"].to_time.strftime("%Y-%m-%d %H:%M:%S")

Loading…
Cancel
Save