Template
1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo synced 2024-11-28 04:36:11 +01:00

Revert "fix GET /{owner}/{repo}/comments/{id}/attachments"

This reverts commit 48bcb1937e.
This commit is contained in:
Loïc Dachary 2023-11-26 06:33:35 +01:00
parent e587faae57
commit 710eee48a1
No known key found for this signature in database
GPG key ID: 992D23B392F9E4F2

View file

@ -3321,16 +3321,6 @@ func GetCommentAttachments(ctx *context.Context) {
return
}
if err := comment.LoadIssue(ctx); err != nil {
ctx.NotFoundOrServerError("LoadIssue", issues_model.IsErrIssueNotExist, err)
return
}
if comment.Issue.RepoID != ctx.Repo.Repository.ID {
ctx.NotFound("CompareRepoID", issues_model.ErrCommentNotExist{})
return
}
if !comment.Type.HasAttachmentSupport() {
ctx.ServerError("GetCommentAttachments", fmt.Errorf("comment type %v does not support attachments", comment.Type))
return