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

Function DeleteAttachmentsByComment

internal/database/attachment.go:193–200  ·  view source on GitHub ↗

DeleteAttachmentsByComment deletes all attachments associated with the given comment.

(commentID int64, remove bool)

Source from the content-addressed store, hash-verified

191
192// DeleteAttachmentsByComment deletes all attachments associated with the given comment.
193func DeleteAttachmentsByComment(commentID int64, remove bool) (int, error) {
194 attachments, err := GetAttachmentsByCommentID(commentID)
195 if err != nil {
196 return 0, err
197 }
198
199 return DeleteAttachments(attachments, remove)
200}

Callers 1

DeleteCommentByIDFunction · 0.85

Calls 2

DeleteAttachmentsFunction · 0.85

Tested by

no test coverage detected