mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Move webhook codes from service to webhook notification (#8712)
* Move webhook codes from service to webhook notification * move deletecomment webhook to notifications * fix notification
This commit is contained in:
parent
f694bb45d7
commit
ac6accef09
5 changed files with 94 additions and 83 deletions
|
@ -10,7 +10,6 @@ import (
|
|||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/notification"
|
||||
api "code.gitea.io/gitea/modules/structs"
|
||||
comment_service "code.gitea.io/gitea/services/comments"
|
||||
)
|
||||
|
@ -196,8 +195,6 @@ func CreateIssueComment(ctx *context.APIContext, form api.CreateIssueCommentOpti
|
|||
return
|
||||
}
|
||||
|
||||
notification.NotifyCreateIssueComment(ctx.User, ctx.Repo.Repository, issue, comment)
|
||||
|
||||
ctx.JSON(201, comment.APIFormat())
|
||||
}
|
||||
|
||||
|
@ -305,8 +302,6 @@ func editIssueComment(ctx *context.APIContext, form api.EditIssueCommentOption)
|
|||
return
|
||||
}
|
||||
|
||||
notification.NotifyUpdateComment(ctx.User, comment, oldContent)
|
||||
|
||||
ctx.JSON(200, comment.APIFormat())
|
||||
}
|
||||
|
||||
|
@ -396,7 +391,5 @@ func deleteIssueComment(ctx *context.APIContext) {
|
|||
return
|
||||
}
|
||||
|
||||
notification.NotifyDeleteComment(ctx.User, comment)
|
||||
|
||||
ctx.Status(204)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue