mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Move some repository related code into sub package (#19711)
* Move some repository related code into sub package * Move more repository functions out of models * Fix lint * Some performance optimization for webhooks and others * some refactors * Fix lint * Fix * Update modules/repository/delete.go Co-authored-by: delvh <dev.lh@web.de> * Fix test * Merge * Fix test * Fix test * Fix test * Fix test Co-authored-by: delvh <dev.lh@web.de>
This commit is contained in:
@@ -195,7 +195,7 @@ func Profile(ctx *context.Context) {
|
||||
}
|
||||
case "stars":
|
||||
ctx.Data["PageIsProfileStarList"] = true
|
||||
repos, count, err = models.SearchRepository(&models.SearchRepoOptions{
|
||||
repos, count, err = repo_model.SearchRepository(&repo_model.SearchRepoOptions{
|
||||
ListOptions: db.ListOptions{
|
||||
PageSize: setting.UI.User.RepoPagingNum,
|
||||
Page: page,
|
||||
@@ -227,7 +227,7 @@ func Profile(ctx *context.Context) {
|
||||
return
|
||||
}
|
||||
case "watching":
|
||||
repos, count, err = models.SearchRepository(&models.SearchRepoOptions{
|
||||
repos, count, err = repo_model.SearchRepository(&repo_model.SearchRepoOptions{
|
||||
ListOptions: db.ListOptions{
|
||||
PageSize: setting.UI.User.RepoPagingNum,
|
||||
Page: page,
|
||||
@@ -249,7 +249,7 @@ func Profile(ctx *context.Context) {
|
||||
|
||||
total = int(count)
|
||||
default:
|
||||
repos, count, err = models.SearchRepository(&models.SearchRepoOptions{
|
||||
repos, count, err = repo_model.SearchRepository(&repo_model.SearchRepoOptions{
|
||||
ListOptions: db.ListOptions{
|
||||
PageSize: setting.UI.User.RepoPagingNum,
|
||||
Page: page,
|
||||
|
Reference in New Issue
Block a user