mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-16 15:02:43 +00:00
Move user related model into models/user (#17781)
* Move user related model into models/user * Fix lint for windows * Fix windows lint * Fix windows lint * Move some tests in models * Merge
This commit is contained in:
parent
4e7ca946da
commit
a666829a37
345 changed files with 4230 additions and 3813 deletions
|
@ -7,7 +7,7 @@ package cron
|
|||
import (
|
||||
"time"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
user_model "code.gitea.io/gitea/models/user"
|
||||
|
||||
"github.com/unknwon/i18n"
|
||||
)
|
||||
|
@ -17,7 +17,7 @@ type Config interface {
|
|||
IsEnabled() bool
|
||||
DoRunAtStart() bool
|
||||
GetSchedule() string
|
||||
FormatMessage(name, status string, doer *models.User, args ...interface{}) string
|
||||
FormatMessage(name, status string, doer *user_model.User, args ...interface{}) string
|
||||
DoNoticeOnSuccess() bool
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ func (b *BaseConfig) DoNoticeOnSuccess() bool {
|
|||
}
|
||||
|
||||
// FormatMessage returns a message for the task
|
||||
func (b *BaseConfig) FormatMessage(name, status string, doer *models.User, args ...interface{}) string {
|
||||
func (b *BaseConfig) FormatMessage(name, status string, doer *user_model.User, args ...interface{}) string {
|
||||
realArgs := make([]interface{}, 0, len(args)+2)
|
||||
realArgs = append(realArgs, i18n.Tr("en-US", "admin.dashboard."+name))
|
||||
if doer == nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue