Skip to content

Commit

Permalink
update_at actual update
Browse files Browse the repository at this point in the history
  • Loading branch information
Pascal-Delange committed Feb 7, 2025
1 parent 82748d9 commit de56e6e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion repositories/sanction_check_repository.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ func (*MarbleDbRepository) UpdateSanctionCheckStatus(ctx context.Context, exec E
NewQueryBuilder().
Update(dbmodels.TABLE_SANCTION_CHECKS).
Set("status", status.String()).
Set("updated_at", "NOW()").
Where(squirrel.Eq{"id": id}),
)
}
Expand Down Expand Up @@ -150,7 +151,11 @@ func (*MarbleDbRepository) UpdateSanctionCheckMatchStatus(

sql := NewQueryBuilder().
Update(dbmodels.TABLE_SANCTION_CHECK_MATCHES).
SetMap(map[string]any{"status": update.Status, "reviewed_by": update.ReviewerId}).
SetMap(map[string]any{
"status": update.Status,
"reviewed_by": update.ReviewerId,
"updated_at": "NOW()",
}).
Where(squirrel.Eq{"id": match.Id}).
Suffix(fmt.Sprintf("RETURNING %s", strings.Join(dbmodels.SelectSanctionCheckMatchesColumn, ",")))

Expand Down

0 comments on commit de56e6e

Please sign in to comment.