and another one

This commit is contained in:
2026-02-10 18:07:44 +11:00
parent 8d5cdd1fc8
commit dd382faa08
10 changed files with 52 additions and 60 deletions

View File

@@ -38,14 +38,14 @@ func ListSeasons(ctx context.Context, tx bun.Tx, pageOpts *PageOpts) (*List[Seas
bun.OrderDesc,
"start_date",
}
return GetList[Season](tx, pageOpts, defaults).GetAll(ctx)
return GetList[Season](tx).GetPaged(ctx, pageOpts, defaults)
}
func GetSeason(ctx context.Context, tx bun.Tx, shortname string) (*Season, error) {
if shortname == "" {
return nil, errors.New("short_name not provided")
}
return GetByField[Season](tx, "short_name", shortname).GetFirst(ctx)
return GetByField[Season](tx, "short_name", shortname).Get(ctx)
}
// Update updates the season struct. It does not insert to the database