feat: 完善后台导入日志权限与备份恢复

This commit is contained in:
Nixevol
2026-07-04 09:06:35 +08:00
parent 5ae3b12fff
commit d484da3862
61 changed files with 2743 additions and 436 deletions
+2 -1
View File
@@ -9,6 +9,7 @@ import { resolve } from 'path';
import { AppModule } from './app.module';
import { AllExceptionsFilter } from './common/filters/all-exceptions.filter';
import { TransformInterceptor } from './common/interceptors/transform.interceptor';
import { OperationLogInterceptor } from './operation-log/operation-log.interceptor';
// 让 BigInt 可被 JSON 序列化为字符串,避免精度问题。
(BigInt.prototype as unknown as { toJSON: () => string }).toJSON = function () {
@@ -44,7 +45,7 @@ async function bootstrap(): Promise<void> {
}),
);
app.useGlobalFilters(new AllExceptionsFilter());
app.useGlobalInterceptors(new TransformInterceptor());
app.useGlobalInterceptors(app.get(OperationLogInterceptor), new TransformInterceptor());
// 本地文件存储静态访问
const localDir = resolve(config.get<string>('storage.localDir') || './storage');