Merge branch 'master' of github.com:medusajs/medusa
This commit is contained in:
@@ -39,9 +39,9 @@
|
|||||||
"body-parser": "^1.19.0",
|
"body-parser": "^1.19.0",
|
||||||
"cors": "^2.8.5",
|
"cors": "^2.8.5",
|
||||||
"express": "^4.17.1",
|
"express": "^4.17.1",
|
||||||
"medusa-core-utils": "^0.1.27",
|
"medusa-core-utils": "^1.0.0-alpha.3",
|
||||||
"medusa-interfaces": "^1.0.0-alpha.3",
|
"medusa-interfaces": "^1.0.0-alpha.3",
|
||||||
"medusa-test-utils": "^1.0.0-alpha.3"
|
"medusa-test-utils": "^1.0.0-alpha.3"
|
||||||
},
|
},
|
||||||
"gitHead": "3cc7cbe5124cbcbb75f6e1435db4dcfaa2a60408"
|
"gitHead": "3cc7cbe5124cbcbb75f6e1435db4dcfaa2a60408"
|
||||||
}
|
}
|
||||||
@@ -1,9 +1,15 @@
|
|||||||
export default async (req, res) => {
|
export default async (req, res) => {
|
||||||
const selector = {}
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const customerService = req.scope.resolve("customerService")
|
const customerService = req.scope.resolve("customerService")
|
||||||
const customers = await customerService.list(selector)
|
const queryBuilderService = req.scope.resolve("queryBuilderService")
|
||||||
|
|
||||||
|
const query = queryBuilderService.buildQuery(req.query, [
|
||||||
|
"email",
|
||||||
|
"first_name",
|
||||||
|
"last_name",
|
||||||
|
])
|
||||||
|
|
||||||
|
const customers = await customerService.list(query)
|
||||||
|
|
||||||
res.json({ customers })
|
res.json({ customers })
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user