fix: api/routes/store/products pass linting (#644)
This commit is contained in:
1 parent
f4307c702a
commit
2966242bc8
3 files changed
-10
No files matched your search
@@ -50,7 +50,6 @@
|
||||
/packages/medusa/src/api/routes/store/auth
|
||||
/packages/medusa/src/api/routes/store/carts
|
||||
/packages/medusa/src/api/routes/store/customers
|
||||
/packages/medusa/src/api/routes/store/products
|
||||
|
||||
/packages/medusa/src/api/routes/store/regions
|
||||
/packages/medusa/src/api/routes/store/return-reasons
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import { MedusaError, Validator } from "medusa-core-utils"
|
||||
import { defaultRelations } from "."
|
||||
|
||||
/**
|
||||
@@ -30,7 +29,6 @@ import { defaultRelations } from "."
|
||||
* $ref: "#/components/schemas/product"
|
||||
*/
|
||||
export default async (req, res) => {
|
||||
try {
|
||||
const productService = req.scope.resolve("productService")
|
||||
|
||||
const limit = parseInt(req.query.limit) || 100
|
||||
@@ -53,7 +51,4 @@ export default async (req, res) => {
|
||||
const products = await productService.list(selector, listConfig)
|
||||
|
||||
res.json({ products, count: products.length, offset, limit })
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,6 @@ export default async (req, res) => {
|
||||
throw new MedusaError(MedusaError.Types.INVALID_DATA, error.details)
|
||||
}
|
||||
|
||||
try {
|
||||
const { q, offset, limit, filter, ...options } = value
|
||||
const paginationOptions = { offset, limit }
|
||||
|
||||
@@ -29,7 +28,4 @@ export default async (req, res) => {
|
||||
})
|
||||
|
||||
res.status(200).send(results)
|
||||
} catch (error) {
|
||||
throw error
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user