mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-22 01:34:18 +00:00
Move login related structs and functions to models/login (#17093)
* Move login related structs and functions to models/login * Fix test * Fix lint * Fix lint * Fix lint of windows * Fix lint * Fix test * Fix test * Only load necessary fixtures when preparing unit tests envs * Fix lint * Fix test * Fix test * Fix error log * Fix error log * Fix error log * remove unnecessary change * fix error log * merge main branch
This commit is contained in:
parent
4a2655098f
commit
5842a55b31
142 changed files with 1050 additions and 907 deletions
|
@ -164,7 +164,7 @@ func removeTopicsFromRepo(e db.Engine, repoID int64) error {
|
|||
|
||||
// FindTopicOptions represents the options when fdin topics
|
||||
type FindTopicOptions struct {
|
||||
ListOptions
|
||||
db.ListOptions
|
||||
RepoID int64
|
||||
Keyword string
|
||||
}
|
||||
|
@ -189,7 +189,7 @@ func FindTopics(opts *FindTopicOptions) ([]*Topic, int64, error) {
|
|||
sess.Join("INNER", "repo_topic", "repo_topic.topic_id = topic.id")
|
||||
}
|
||||
if opts.PageSize != 0 && opts.Page != 0 {
|
||||
sess = setSessionPagination(sess, opts)
|
||||
sess = db.SetSessionPagination(sess, opts)
|
||||
}
|
||||
topics := make([]*Topic, 0, 10)
|
||||
total, err := sess.Desc("topic.repo_count").FindAndCount(&topics)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue