mirror of
https://github.com/go-gitea/gitea.git
synced 2025-08-22 07:21:31 +00:00
improvements
This commit is contained in:
parent
e00c7d32af
commit
27c83deb6d
@ -7,7 +7,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"net/http"
|
"net/http"
|
||||||
|
|
||||||
"code.gitea.io/gitea/models/db"
|
|
||||||
issues_model "code.gitea.io/gitea/models/issues"
|
issues_model "code.gitea.io/gitea/models/issues"
|
||||||
repo_model "code.gitea.io/gitea/models/repo"
|
repo_model "code.gitea.io/gitea/models/repo"
|
||||||
user_model "code.gitea.io/gitea/models/user"
|
user_model "code.gitea.io/gitea/models/user"
|
||||||
@ -392,10 +391,6 @@ func getIssueCommentAttachmentSafeRead(ctx *context.APIContext, comment *issues_
|
|||||||
if !attachmentBelongsToRepoOrComment(ctx, attachment, comment) {
|
if !attachmentBelongsToRepoOrComment(ctx, attachment, comment) {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
if attachment.Status != db.FileStatusNormal {
|
|
||||||
ctx.APIErrorNotFound()
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
return attachment
|
return attachment
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user