add middleware writeLog

This commit is contained in:
joseph le 2023-09-29 11:07:07 +07:00
parent a90dfeee13
commit aa0249eb28
1 changed files with 5 additions and 0 deletions

View File

@ -16,6 +16,11 @@ const shortenStringsInObject = (obj, maxLength) => {
// Rút ngắn chuỗi lại maxLength ký tự
obj[key] = obj[key].substring(0, maxLength);
}
if (Array.isArray(obj[key]) && obj[key].length > 20) {
// Rút ngắn chuỗi lại maxLength ký tự
obj[key] = obj[key].slice(0,20)
}
}
}