tb/main #1

Open
terrabytten wants to merge 17 commits from tb/main into main
3 changed files with 3 additions and 2 deletions
Showing only changes of commit 79977f1a18 - Show all commits

View file

@ -0,0 +1 @@
package application

View file

@ -46,7 +46,7 @@ func (d *Database) FindClaimsByProductID(product_id int) (claims []models.Claim,
SELECT "automated" as cluster, id, product_id, worker_type, null as evidence_type, evidence, unnest(counter_claim) as category, false as polarity, created_at, null as created_by FROM automated_claims SELECT "automated" as cluster, id, product_id, worker_type, null as evidence_type, evidence, unnest(counter_claim) as category, false as polarity, created_at, null as created_by FROM automated_claims
) )
) )
WHERE product_id = ? WHERE product_id = $1
) )
WHERE rn = 1 WHERE rn = 1
ORDER BY created_at; ORDER BY created_at;
@ -63,7 +63,7 @@ func (database *Database) FindUserClaimById(claim_id int) (*UserClaim, error) {
var claim UserClaim var claim UserClaim
err := database.db.QueryOne(ctx, claim, "FROM user_claims WHERE id = ?", claim_id) err := database.db.QueryOne(ctx, claim, "FROM user_claims WHERE id = $1", claim_id)
if err == ksql.ErrRecordNotFound { if err == ksql.ErrRecordNotFound {
return nil, err return nil, err