mirror of
https://github.com/go-gitea/gitea.git
synced 2024-05-11 05:55:29 +00:00
Use more IssueList
instead of []*Issue
(#26369)
This commit is contained in:
@ -854,8 +854,8 @@ func (issue *Issue) MovePin(ctx context.Context, newPosition int) error {
|
||||
}
|
||||
|
||||
// GetPinnedIssues returns the pinned Issues for the given Repo and type
|
||||
func GetPinnedIssues(ctx context.Context, repoID int64, isPull bool) ([]*Issue, error) {
|
||||
issues := make([]*Issue, 0)
|
||||
func GetPinnedIssues(ctx context.Context, repoID int64, isPull bool) (IssueList, error) {
|
||||
issues := make(IssueList, 0)
|
||||
|
||||
err := db.GetEngine(ctx).
|
||||
Table("issue").
|
||||
@ -868,7 +868,7 @@ func GetPinnedIssues(ctx context.Context, repoID int64, isPull bool) ([]*Issue,
|
||||
return nil, err
|
||||
}
|
||||
|
||||
err = IssueList(issues).LoadAttributes(ctx)
|
||||
err = issues.LoadAttributes(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user