1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-08-03 00:45:22 +02: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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
}