Brings the ERP inventory export up to date with the platform backbone and field capture work. Conflicts in ARCHITECTURE.md, the API key service and the API key settings tab resolved by keeping both sides: - read and write keys stay separate; erp-inventory:read is read-only and cannot be combined with a write scope - the failed-attempt lockout counts in the shared ThrottlerHit table so it holds across API pods - the UI offers only scopes the user holds and creates one scope per key Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
18 lines
716 B
TypeScript
18 lines
716 B
TypeScript
import { Global, Module } from '@nestjs/common';
|
|
import { ThrottlerStorageModule } from '../common/throttler/throttler-storage.module';
|
|
import { ApiKeysController } from './api-keys.controller';
|
|
import { ApiKeysService } from './api-keys.service';
|
|
import { FailedAttemptLimiter } from './failed-attempt-limiter';
|
|
|
|
// Global: the app-wide auth guards need ApiKeysService to recognise keys.
|
|
// ThrottlerStorageModule: the failure counters share the rate-limit table,
|
|
// so the limit holds across all api pods.
|
|
@Global()
|
|
@Module({
|
|
imports: [ThrottlerStorageModule],
|
|
controllers: [ApiKeysController],
|
|
providers: [ApiKeysService, FailedAttemptLimiter],
|
|
exports: [ApiKeysService],
|
|
})
|
|
export class ApiKeysModule {}
|