Fix small issues

Signed-off-by: Sacha Al Himdani <sacha@getprobo.com>
This commit is contained in:
Sacha Al Himdani
2026-02-13 13:03:34 +01:00
parent 5f76f3245a
commit 3b9a1edf68
3 changed files with 12 additions and 9 deletions

View File

@@ -52,12 +52,14 @@ func (s *WebhookDataStatus) UnmarshalText(text []byte) error {
} }
func (s *WebhookDataStatus) Scan(value any) error { func (s *WebhookDataStatus) Scan(value any) error {
str, ok := value.(string) switch v := value.(type) {
if !ok { case string:
return s.UnmarshalText([]byte(v))
case []byte:
return s.UnmarshalText(v)
default:
return fmt.Errorf("unsupported type for WebhookDataStatus: %T", value) return fmt.Errorf("unsupported type for WebhookDataStatus: %T", value)
} }
return s.UnmarshalText([]byte(str))
} }
func (s WebhookDataStatus) Value() (driver.Value, error) { func (s WebhookDataStatus) Value() (driver.Value, error) {

View File

@@ -51,12 +51,14 @@ func (s *WebhookEventStatus) UnmarshalText(text []byte) error {
} }
func (s *WebhookEventStatus) Scan(value any) error { func (s *WebhookEventStatus) Scan(value any) error {
str, ok := value.(string) switch v := value.(type) {
if !ok { case string:
return s.UnmarshalText([]byte(v))
case []byte:
return s.UnmarshalText(v)
default:
return fmt.Errorf("unsupported type for WebhookEventStatus: %T", value) return fmt.Errorf("unsupported type for WebhookEventStatus: %T", value)
} }
return s.UnmarshalText([]byte(str))
} }
func (s WebhookEventStatus) Value() (driver.Value, error) { func (s WebhookEventStatus) Value() (driver.Value, error) {

View File

@@ -197,7 +197,6 @@ func (s *Sender) deliverToConfiguration(
s.logger.ErrorCtx(ctx, "error delivering webhook", s.logger.ErrorCtx(ctx, "error delivering webhook",
log.Error(sendErr), log.Error(sendErr),
log.String("webhook_data_id", webhookData.ID.String()), log.String("webhook_data_id", webhookData.ID.String()),
log.String("endpoint_url", config.EndpointURL),
) )
} }