Merge branch 'integration/dummy-project' of github.com:medusajs/medusa into integration/dummy-project

This commit is contained in:
Sebastian Rindom
2020-07-08 22:21:09 +02:00
12 changed files with 11798 additions and 0 deletions
@@ -0,0 +1,10 @@
export default async (req, res) => {
const { id } = req.params
try {
const customerService = req.scope.resolve("customerService")
let customer = await customerService.retrieve(id)
res.json({ customer })
} catch (err) {
throw err
}
}
@@ -0,0 +1,12 @@
export default async (req, res) => {
const selector = {}
try {
const customerService = req.scope.resolve("customerService")
const customers = await customerService.list(selector)
res.json({ customers })
} catch (error) {
throw error
}
}