cookiebanner: rename DetectedTracker.InsertIfNotExists to Upsert
The method uses ON CONFLICT ... DO UPDATE, so the name now matches the actual behaviour. TrackerPattern.InsertIfNotExists keeps its name because it uses ON CONFLICT ... DO NOTHING. Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
@@ -2179,8 +2179,8 @@ func (s *Service) reportDetectedTracker(
|
||||
UpdatedAt: now,
|
||||
}
|
||||
|
||||
if _, err := tracker.InsertIfNotExists(ctx, tx, scope); err != nil {
|
||||
return fmt.Errorf("cannot insert detected tracker: %w", err)
|
||||
if _, err := tracker.Upsert(ctx, tx, scope); err != nil {
|
||||
return fmt.Errorf("cannot upsert detected tracker: %w", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user