wip: endpoint working

This commit is contained in:
Gabe Farrell 2025-12-30 03:33:02 -05:00
parent 3b585f748a
commit 6b73f83484
19 changed files with 510 additions and 243 deletions

View file

@ -25,6 +25,10 @@ func (d *Psql) GetTopAlbumsPaginated(ctx context.Context, opts db.GetItemsOpts)
t2 = time.Now()
t1 = db.StartTimeFromPeriod(opts.Period)
}
if opts.From != 0 || opts.To != 0 {
t1 = time.Unix(opts.From, 0)
t2 = time.Unix(opts.To, 0)
}
if opts.Limit == 0 {
opts.Limit = DefaultItemsPerPage
}