Skip to content

Commit

Permalink
Remove impossible error case
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkRunWu committed Dec 13, 2023
1 parent 525b007 commit e8776e7
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions internal/handler/controller/app_config.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package controller

import (
"errors"
"fmt"
"net/http"

Expand Down Expand Up @@ -44,7 +43,7 @@ func (c *Controller) handleAppConfigSet(w http.ResponseWriter, r *http.Request)

// Deactivated removed domains; added domains need manual activation.
domains, err := tx.ListDomains(r.Context(), app.ID)
if err != nil && !errors.Is(err, models.ErrDomainNotFound) {
if err != nil {
return nil, err
}
for _, d := range domains {
Expand All @@ -60,7 +59,7 @@ func (c *Controller) handleAppConfigSet(w http.ResponseWriter, r *http.Request)
log(r).Info("deleting domain", zap.String("domain", d.Domain))
}
domainVerifications, err := tx.ListDomainVerifications(r.Context(), app.ID)
if err != nil && !errors.Is(err, models.ErrDomainNotFound) {
if err != nil {
return nil, err
}
for _, d := range domainVerifications {
Expand Down

0 comments on commit e8776e7

Please sign in to comment.