mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-21 12:02:15 +08:00
fix(server): avoid repeatly register providers (#5265)
This commit is contained in:
@@ -9,14 +9,13 @@ import {
|
||||
import Redis from 'ioredis';
|
||||
import { ThrottlerStorageRedisService } from 'nestjs-throttler-storage-redis';
|
||||
|
||||
import { Config, ConfigModule } from './config';
|
||||
import { Config } from './config';
|
||||
import { getRequestResponseFromContext } from './utils/nestjs';
|
||||
|
||||
@Global()
|
||||
@Module({
|
||||
imports: [
|
||||
ThrottlerModule.forRootAsync({
|
||||
imports: [ConfigModule],
|
||||
inject: [Config],
|
||||
useFactory: (config: Config): ThrottlerModuleOptions => {
|
||||
const options: ThrottlerModuleOptions = {
|
||||
|
||||
Reference in New Issue
Block a user