refacotr: change type from object to string instead

This commit is contained in:
Methapon2001 2024-04-09 17:54:04 +07:00
parent 1e06b3356f
commit eda469779b

View file

@ -60,8 +60,8 @@ async function logMiddleware(req: Request, res: Response, next: NextFunction) {
: { 200: "success", 201: "created_success", 204: "no_content", 304: "success" }[
res.statusCode
],
// input: (level < 1 && req.body) || undefined,
// output: (level < 1 && data) || undefined,
input: (level === 4 && JSON.stringify(req.body, null, 2)) || undefined,
output: (level === 4 && JSON.stringify(data, null, 2)) || undefined,
...req.app.locals.logData,
};