fix delete too

This commit is contained in:
Andre Medeiros 2023-03-24 13:38:27 -04:00
parent 586458a242
commit 4b7800e36d
No known key found for this signature in database
GPG key ID: 38F11905BF87C320

View file

@ -285,6 +285,6 @@ func (p *postgresWatcherRepository) Delete(ctx context.Context, id int64) error
func (p *postgresWatcherRepository) DeleteByTypeAndWatcheeID(ctx context.Context, typ domain.WatcherType, id int64) error {
query := `DELETE FROM watchers WHERE type = $1 AND watchee_id = $2`
_, err := p.conn.Exec(ctx, query, typ, id)
_, err := p.conn.Exec(ctx, query, int64(typ), id)
return err
}