From 4732c835b490bc77d775a7c849b5fdaf67c75911 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Mon, 31 Mar 2025 16:39:39 +0700 Subject: [PATCH] fix salary logs --- src/interfaces/utils.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/utils.ts b/src/interfaces/utils.ts index 30035f0..c5f6bf8 100644 --- a/src/interfaces/utils.ts +++ b/src/interfaces/utils.ts @@ -20,8 +20,8 @@ export type LogSequence = { export function setLogDataDiff(req: RequestWithUser, data: DataDiff) { req.app.locals.logData.dataDiff = { - before: JSON.stringify(data.before), - after: JSON.stringify(data.after), + before: data.before ? JSON.stringify(data.before) : "", + after: data.after ? JSON.stringify(data.after) : "", }; }