add middleware writeLog

This commit is contained in:
joseph le 2023-09-29 15:11:15 +07:00
parent 64a2fa5a54
commit bddb56f41f
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,8 @@ const shortenStringsInObject = (obj, maxLength) => {
export function loggerAPI(request, response, location) { export function loggerAPI(request, response, location) {
let old_data = ""; let old_data = "";
let body = shortenStringsInObject(response.getBody(), 300) let resBody = response.getBody()
let body = shortenStringsInObject(resBody, 300)
try { try {
const fileName = const fileName =
"./app/store/logsAPI/" + "./app/store/logsAPI/" +