1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

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
16 changed files with 250 additions and 211 deletions

View File

@@ -9,13 +9,14 @@ import (
activities_model "code.gitea.io/gitea/models/activities"
repo_model "code.gitea.io/gitea/models/repo"
"code.gitea.io/gitea/services/context"
feed_service "code.gitea.io/gitea/services/feed"
"github.com/gorilla/feeds"
)
// ShowRepoFeed shows user activity on the repo as RSS / Atom feed
func ShowRepoFeed(ctx *context.Context, repo *repo_model.Repository, formatType string) {
actions, _, err := activities_model.GetFeeds(ctx, activities_model.GetFeedsOptions{
actions, _, err := feed_service.GetFeeds(ctx, activities_model.GetFeedsOptions{
RequestedRepo: repo,
Actor: ctx.Doer,
IncludePrivate: true,