chore: remove unused parseShippingMethodType function
This commit is contained in:
parent
7105549faf
commit
d1d2f3f338
1 changed files with 0 additions and 13 deletions
|
|
@ -159,19 +159,6 @@ func (h *Handler) CalculateShipping(w http.ResponseWriter, r *http.Request) {
|
||||||
writeJSON(w, http.StatusOK, options)
|
writeJSON(w, http.StatusOK, options)
|
||||||
}
|
}
|
||||||
|
|
||||||
func parseShippingMethodType(value string) (domain.ShippingMethodType, error) {
|
|
||||||
switch strings.ToLower(strings.TrimSpace(value)) {
|
|
||||||
case string(domain.ShippingMethodPickup):
|
|
||||||
return domain.ShippingMethodPickup, nil
|
|
||||||
case string(domain.ShippingMethodOwnDelivery):
|
|
||||||
return domain.ShippingMethodOwnDelivery, nil
|
|
||||||
case string(domain.ShippingMethodThirdParty):
|
|
||||||
return domain.ShippingMethodThirdParty, nil
|
|
||||||
default:
|
|
||||||
return "", errors.New("invalid shipping method type")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// ListShipments godoc
|
// ListShipments godoc
|
||||||
// @Summary List shipments
|
// @Summary List shipments
|
||||||
// @Description Returns shipments. Admins see all, Tenants see only their own.
|
// @Description Returns shipments. Admins see all, Tenants see only their own.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue