feat: 完善后台导入日志权限与备份恢复
This commit is contained in:
@@ -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');
|
||||
|
||||
Reference in New Issue
Block a user