1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Move user functions into user.go (#17659)

* Move user functions into user.go

* Fix test
This commit is contained in:
Lunny Xiao
2021-11-18 13:58:42 +08:00
committed by GitHub
parent 6874fe90e5
commit 3c3855a05c
14 changed files with 101 additions and 72 deletions

View File

@@ -5,6 +5,7 @@
package models
import (
admin_model "code.gitea.io/gitea/models/admin"
"code.gitea.io/gitea/models/db"
"xorm.io/builder"
@@ -127,7 +128,7 @@ func DeleteOrphanedIssues() error {
// Remove issue attachment files.
for i := range attachmentPaths {
removeAllWithNotice(db.GetEngine(db.DefaultContext), "Delete issue attachment", attachmentPaths[i])
admin_model.RemoveAllWithNoticeCtx(db.DefaultContext, "Delete issue attachment", attachmentPaths[i])
}
return nil
}