MCPcopy Create free account
hub / github.com/gogs/gogs / DeleteAttachmentsByIssue

Function DeleteAttachmentsByIssue

internal/database/attachment.go:183–190  ·  view source on GitHub ↗

DeleteAttachmentsByIssue deletes all attachments associated with the given issue.

(issueID int64, remove bool)

Source from the content-addressed store, hash-verified

181
182// DeleteAttachmentsByIssue deletes all attachments associated with the given issue.
183func DeleteAttachmentsByIssue(issueID int64, remove bool) (int, error) {
184 attachments, err := GetAttachmentsByIssueID(issueID)
185 if err != nil {
186 return 0, err
187 }
188
189 return DeleteAttachments(attachments, remove)
190}
191
192// DeleteAttachmentsByComment deletes all attachments associated with the given comment.
193func DeleteAttachmentsByComment(commentID int64, remove bool) (int, error) {

Callers

nothing calls this directly

Calls 2

GetAttachmentsByIssueIDFunction · 0.85
DeleteAttachmentsFunction · 0.85

Tested by

no test coverage detected