forked from forgejo/forgejo
Move issues related files into models/issues (#19931)
* Move access and repo permission to models/perm/access * fix test * fix git test * Move functions sequence * Some improvements per @KN4CK3R and @delvh * Move issues related code to models/issues * Move some issues related sub package * Merge * Fix test * Fix test * Fix test * Fix test * Rename some files
This commit is contained in:
parent
3708ca8e28
commit
1a9821f57a
180 changed files with 3667 additions and 3677 deletions
|
@ -10,6 +10,7 @@ import (
|
|||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
issues_model "code.gitea.io/gitea/models/issues"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/convert"
|
||||
)
|
||||
|
@ -41,7 +42,7 @@ func GetThread(ctx *context.APIContext) {
|
|||
if n == nil {
|
||||
return
|
||||
}
|
||||
if err := n.LoadAttributes(); err != nil && !models.IsErrCommentNotExist(err) {
|
||||
if err := n.LoadAttributes(); err != nil && !issues_model.IsErrCommentNotExist(err) {
|
||||
ctx.InternalServerError(err)
|
||||
return
|
||||
}
|
||||
|
@ -93,7 +94,7 @@ func ReadThread(ctx *context.APIContext) {
|
|||
ctx.InternalServerError(err)
|
||||
return
|
||||
}
|
||||
if err = notif.LoadAttributes(); err != nil && !models.IsErrCommentNotExist(err) {
|
||||
if err = notif.LoadAttributes(); err != nil && !issues_model.IsErrCommentNotExist(err) {
|
||||
ctx.InternalServerError(err)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue