fix(page-templates): import ThrottleModule into collab app so it boots
PageTemplateController (added on this branch) guards its lookup/toggle routes with UserThrottlerGuard, which depends on the throttler options provided by ThrottleModule. CollaborationModule -> TransclusionModule registers that controller, and the collab server bootstraps CollabAppModule, which did not import ThrottleModule. The API server's AppModule does, so :3000 booted, but the collab server (:3001) crashed at startup with 'Nest can't resolve dependencies of the UserThrottlerGuard ... THROTTLER:MODULE_OPTIONS'. Without collab the editor can't sync, so live editing was broken on this branch. Import ThrottleModule into CollabAppModule, mirroring AppModule, so the guard resolves in the collab process too. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,11 @@ import { LoggerModule } from '../../common/logger/logger.module';
|
||||
import { RedisModule } from '@nestjs-labs/nestjs-ioredis';
|
||||
import { RedisConfigService } from '../../integrations/redis/redis-config.service';
|
||||
import { CaslModule } from '../../core/casl/casl.module';
|
||||
// TransclusionModule (via CollaborationModule) registers PageTemplateController,
|
||||
// whose UserThrottlerGuard needs the throttler options from ThrottleModule. The
|
||||
// API server's AppModule imports it; the collab process must too or it fails to
|
||||
// resolve THROTTLER:MODULE_OPTIONS at boot.
|
||||
import { ThrottleModule } from '../../integrations/throttle/throttle.module';
|
||||
import { CacheModule } from '@nestjs/cache-manager';
|
||||
import KeyvRedis from '@keyv/redis';
|
||||
|
||||
@@ -22,6 +27,7 @@ import KeyvRedis from '@keyv/redis';
|
||||
DatabaseModule,
|
||||
EnvironmentModule,
|
||||
CaslModule,
|
||||
ThrottleModule,
|
||||
CollaborationModule,
|
||||
QueueModule,
|
||||
HealthModule,
|
||||
|
||||
Reference in New Issue
Block a user