Skip to content

Commit

Permalink
chore: don't save in svc.stopSusbcription
Browse files Browse the repository at this point in the history
  • Loading branch information
im-adithya committed Jun 1, 2024
1 parent ac691e4 commit 3bc32d3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions internal/nostr/nostr.go
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,10 @@ func (svc *Service) StopSubscriptionHandler(c echo.Context) error {
})
}

subscription.Open = false
svc.db.Save(&subscription)
// delete svix app

svc.Logger.WithFields(logrus.Fields{
"subscriptionId": subscription.ID,
}).Info("Stopped subscription")
Expand All @@ -624,10 +628,6 @@ func (svc *Service) stopSubscription(subscription *Subscription) error {
return errors.New(SUBSCRIPTION_ALREADY_CLOSED)
}

subscription.Open = false
svc.db.Save(&subscription)
// delete svix app

return nil
}

Expand Down

0 comments on commit 3bc32d3

Please sign in to comment.