From 622c274debb7087afdb76b8b283b0b47540cd462 Mon Sep 17 00:00:00 2001 From: oitsjustjose Date: Fri, 15 Apr 2022 08:29:00 -0500 Subject: [PATCH] Redact user data --- backend/src/app/controllers/user/crud/update.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/backend/src/app/controllers/user/crud/update.ts b/backend/src/app/controllers/user/crud/update.ts index ba1beff..0e24c23 100644 --- a/backend/src/app/controllers/user/crud/update.ts +++ b/backend/src/app/controllers/user/crud/update.ts @@ -29,8 +29,10 @@ export default async (req: Request, res: Response) => { if (req.body.email) { await ValidateEmail(user); } - - return res.status(200).json({ "Successfully Deleted": user }); + return res.status(200).json({ + ...user, + password: "REDACTED", + }); } catch (ex) { LOGGER.error(ex); return res.status(500).json({ error: ex });