Skip to content

Commit 8592e38

Browse files
committed
fix: Ensures releases are ordered by creation date to find latest release
1 parent ee84a93 commit 8592e38

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

gql/resolver_modpacks.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ func (r *queryResolver) GetModpack(ctx context.Context, modpackID string) (*gene
3939
dbModpack, err := db.From(ctx).Modpack.Query().
4040
Where(modpack.ID(modpackID)).
4141
WithTags().
42-
WithReleases().
42+
WithReleases(func(q *ent.ModpackReleaseQuery) {
43+
q.Order(ent.Desc(modpackrelease.FieldCreatedAt))
44+
}).
4345
WithModpackMods().
4446
WithParent().
4547
WithChildren().

0 commit comments

Comments
 (0)