Browse Source

操作日志

wuyi 1 year ago
parent
commit
5c9f152497
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/operation-log/operation-log.service.ts

+ 5 - 1
src/operation-log/operation-log.service.ts

@@ -30,7 +30,11 @@ export class OperationLogService {
         log.objectName = ObjectName
         log.operationType = operationType
         log.description = description
-        log.details = details.toString() || JSON.stringify(Object)
+        if (details) {
+            log.details = details.toString()
+        } else {
+            log.details = JSON.stringify(Object)
+        }
         await this.OperationLogRepository.save(log)
     }