tb/main #1

Open
terrabytten wants to merge 17 commits from tb/main into main
Showing only changes of commit 43c183c29a - Show all commits

View file

@ -7,7 +7,9 @@ import (
func (database *Database) FindClaimsByProductID(product_id int) (claims []models.Claim, err error) { func (database *Database) FindClaimsByProductID(product_id int) (claims []models.Claim, err error) {
ctx := context.Background() ctx := context.Background()
err = database.db.Query(ctx, claims, `SELECT
err = database.db.Query(ctx, claims, `
SELECT
cluster, cluster,
id, id,
worker_type, worker_type,
@ -47,6 +49,7 @@ FROM (
WHERE rn = 1 WHERE rn = 1
ORDER BY created_at; ORDER BY created_at;
`, product_id) `, product_id)
if err != nil { if err != nil {
return claims, err return claims, err
} }