and another one
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user