Skip to content

Commit

Permalink
refactor: move code for easier diffs
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelbrm committed Feb 1, 2024
1 parent 53b83d6 commit 64e1b3c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions services/skus/controllers.go
Original file line number Diff line number Diff line change
Expand Up @@ -1405,22 +1405,6 @@ func HandleStripeWebhook(service *Service) handlers.AppHandler {
}
}

type legacyOrderHandler struct {
svc *Service
lg *zerolog.Logger
valid *validator.Validate
}

func newLegacyOrderHandler(svc *Service, lg *zerolog.Logger, valid *validator.Validate) *legacyOrderHandler {
result := &legacyOrderHandler{
svc: svc,
lg: lg,
valid: valid,
}

return result
}

// submitReceipt handles receipt submission requests.
func (h *legacyOrderHandler) submitReceipt(w http.ResponseWriter, r *http.Request) *handlers.AppError {
ctx := r.Context()
Expand Down Expand Up @@ -1702,3 +1686,19 @@ func collectValidationErrors(err error) (map[string]string, bool) {

return result, true
}

type legacyOrderHandler struct {
svc *Service
lg *zerolog.Logger
valid *validator.Validate
}

func newLegacyOrderHandler(svc *Service, lg *zerolog.Logger, valid *validator.Validate) *legacyOrderHandler {
result := &legacyOrderHandler{
svc: svc,
lg: lg,
valid: valid,
}

return result
}

0 comments on commit 64e1b3c

Please sign in to comment.