Fix: admin api create customer (#826)

This commit is contained in:
Derek Wene
2021-11-20 11:50:28 +01:00
committed by GitHub
parent f162b4a2a1
commit ebb7c0aa53
2 changed files with 50 additions and 1 deletions
@@ -27,7 +27,7 @@ import { validator } from "../../../../utils/validator"
* $ref: "#/components/schemas/customer"
*/
export default async (req, res) => {
const validated = await validator(AdminPostCustomersReq, req.bodyn)
const validated = await validator(AdminPostCustomersReq, req.body)
const customerService: CustomerService = req.scope.resolve("customerService")
const customer = await customerService.create(validated)