fix: make packages/medusa/src/api/routes/store/shipping-options pass linting (#648)

This commit is contained in:
Penthaa Patel
2021-10-25 08:22:17 +02:00
committed by GitHub
parent 2966242bc8
commit 5cb1b5687e
3 changed files with 31 additions and 40 deletions
+1 -1
View File
@@ -54,7 +54,7 @@
/packages/medusa/src/api/routes/store/regions /packages/medusa/src/api/routes/store/regions
/packages/medusa/src/api/routes/store/return-reasons /packages/medusa/src/api/routes/store/return-reasons
/packages/medusa/src/api/routes/store/returns /packages/medusa/src/api/routes/store/returns
/packages/medusa/src/api/routes/store/shipping-options
/packages/medusa/src/api/routes/store/swaps /packages/medusa/src/api/routes/store/swaps
# END OF FILES TODO # END OF FILES TODO
@@ -25,8 +25,6 @@ export default async (req, res) => {
const productIds = const productIds =
(req.query.product_ids && req.query.product_ids.split(",")) || [] (req.query.product_ids && req.query.product_ids.split(",")) || []
const regionId = req.query.region_id const regionId = req.query.region_id
try {
const productService = req.scope.resolve("productService") const productService = req.scope.resolve("productService")
const shippingOptionService = req.scope.resolve("shippingOptionService") const shippingOptionService = req.scope.resolve("shippingOptionService")
@@ -52,7 +50,4 @@ export default async (req, res) => {
}) })
res.status(200).json({ shipping_options: options }) res.status(200).json({ shipping_options: options })
} catch (err) {
throw err
}
} }
@@ -31,7 +31,6 @@ export default async (req, res) => {
throw new MedusaError(MedusaError.Types.INVALID_DATA, error.details) throw new MedusaError(MedusaError.Types.INVALID_DATA, error.details)
} }
try {
const cartService = req.scope.resolve("cartService") const cartService = req.scope.resolve("cartService")
const shippingProfileService = req.scope.resolve("shippingProfileService") const shippingProfileService = req.scope.resolve("shippingProfileService")
@@ -43,7 +42,4 @@ export default async (req, res) => {
const options = await shippingProfileService.fetchCartOptions(cart) const options = await shippingProfileService.fetchCartOptions(cart)
res.status(200).json({ shipping_options: options }) res.status(200).json({ shipping_options: options })
} catch (err) {
throw err
}
} }