@@ -1624,7 +1624,7 @@ func (s OrganizationService) DeleteSCIMConfiguration(
|
|||||||
connector := &coredata.Connector{ID: *bridge.ConnectorID}
|
connector := &coredata.Connector{ID: *bridge.ConnectorID}
|
||||||
|
|
||||||
err = connector.Delete(ctx, tx, scope)
|
err = connector.Delete(ctx, tx, scope)
|
||||||
if err != nil && err != coredata.ErrResourceNotFound {
|
if err != nil {
|
||||||
return fmt.Errorf("cannot delete connector: %w", err)
|
return fmt.Errorf("cannot delete connector: %w", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -269,10 +269,6 @@ func (s *Service) UnsubscribeByEmail(
|
|||||||
wasConfirmed := subscriber.Status == coredata.MailingListSubscriberStatusConfirmed
|
wasConfirmed := subscriber.Status == coredata.MailingListSubscriberStatusConfirmed
|
||||||
|
|
||||||
if err := subscriber.Delete(ctx, tx, scope); err != nil {
|
if err := subscriber.Delete(ctx, tx, scope); err != nil {
|
||||||
if errors.Is(err, coredata.ErrResourceNotFound) {
|
|
||||||
return ErrSubscriberNotFound
|
|
||||||
}
|
|
||||||
|
|
||||||
return fmt.Errorf("cannot delete mailing list subscriber: %w", err)
|
return fmt.Errorf("cannot delete mailing list subscriber: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -348,10 +344,6 @@ func (s *Service) DeleteSubscriber(
|
|||||||
wasConfirmed := subscriber.Status == coredata.MailingListSubscriberStatusConfirmed
|
wasConfirmed := subscriber.Status == coredata.MailingListSubscriberStatusConfirmed
|
||||||
|
|
||||||
if err := subscriber.Delete(ctx, tx, scope); err != nil {
|
if err := subscriber.Delete(ctx, tx, scope); err != nil {
|
||||||
if errors.Is(err, coredata.ErrResourceNotFound) {
|
|
||||||
return ErrSubscriberNotFound
|
|
||||||
}
|
|
||||||
|
|
||||||
return fmt.Errorf("cannot delete mailing list subscriber: %w", err)
|
return fmt.Errorf("cannot delete mailing list subscriber: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -606,10 +598,6 @@ func (s *Service) DeleteMailingListUpdate(
|
|||||||
func(ctx context.Context, tx pg.Tx) error {
|
func(ctx context.Context, tx pg.Tx) error {
|
||||||
mlu := coredata.MailingListUpdate{ID: id}
|
mlu := coredata.MailingListUpdate{ID: id}
|
||||||
if err := mlu.Delete(ctx, tx, scope); err != nil {
|
if err := mlu.Delete(ctx, tx, scope); err != nil {
|
||||||
if errors.Is(err, coredata.ErrResourceNotFound) {
|
|
||||||
return ErrMailingListUpdateNotFound
|
|
||||||
}
|
|
||||||
|
|
||||||
return fmt.Errorf("cannot delete mailing list update: %w", err)
|
return fmt.Errorf("cannot delete mailing list update: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user