更改:webhook更新返回结构体

This commit is contained in:
2023-04-12 18:34:49 +08:00
parent f64afb8f55
commit 4bd60d458e
7 changed files with 59 additions and 15 deletions

View File

@@ -27,7 +27,7 @@ class Api::V1::Issues::JournalsController < Api::V1::BaseController
end
def destroy
TouchWebhookJob.perform_later('IssueComment', @issue&.id, current_user.id, @journal.id, 'deleted', JSON.parse(@journal.to_builder.target!))
TouchWebhookJob.set(wait: 5.seconds).perform_later('IssueComment', @issue&.id, current_user.id, @journal.id, 'deleted', JSON.parse(@journal.to_builder.target!))
if @journal.destroy!
render_ok
else

View File

@@ -62,7 +62,7 @@ class JournalsController < ApplicationController
def destroy
if @journal.destroy #如果有子评论,子评论删除吗?
TouchWebhookJob.perform_later('PullRequestComment', @issue&.id, current_user.id, @journal.id, 'deleted', JSON.parse(@journal.to_builder.target!))
TouchWebhookJob.set(wait: 5.seconds).perform_later('PullRequestComment', @issue&.id, current_user.id, @journal.id, 'deleted', JSON.parse(@journal.to_builder.target!))
Journal.children_journals(@journal.id).destroy_all
normal_status(0, "评论删除成功")
else