Move GetFeeds to service layer (#32526)

Move GetFeeds from models to service layer, no code change.
This commit is contained in:
Lunny Xiao 2024-11-29 09:53:49 -08:00 committed by GitHub
parent 93640993e3
commit 1ed5f379b9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 250 additions and 211 deletions

View file

@ -13,6 +13,7 @@ import (
"code.gitea.io/gitea/routers/api/v1/utils"
"code.gitea.io/gitea/services/context"
"code.gitea.io/gitea/services/convert"
feed_service "code.gitea.io/gitea/services/feed"
)
// Search search users
@ -214,7 +215,7 @@ func ListUserActivityFeeds(ctx *context.APIContext) {
ListOptions: listOptions,
}
feeds, count, err := activities_model.GetFeeds(ctx, opts)
feeds, count, err := feed_service.GetFeeds(ctx, opts)
if err != nil {
ctx.Error(http.StatusInternalServerError, "GetFeeds", err)
return