From 2994342be021388e423fd1114fae7a80db37e167 Mon Sep 17 00:00:00 2001 From: tungd0 Date: Wed, 17 May 2023 17:35:34 +0000 Subject: [PATCH] fix list user error --- src/api/controllers/v1/user.controller.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/api/controllers/v1/user.controller.js b/src/api/controllers/v1/user.controller.js index 99af8e9..43984c2 100644 --- a/src/api/controllers/v1/user.controller.js +++ b/src/api/controllers/v1/user.controller.js @@ -69,7 +69,9 @@ exports.list = async (req, res, next) => { res.json({ code: 0, count: req.totalRecords, - data: result + data: result.map( + x => User.transform(x) + ) }); }).catch(ex => { ErrorHandler(ex, req, res, next);