fix(#85): resolve TypeScript compilation and validation issues
- Fix @IsNumber() validator on timestamp field (was @IsString() - critical security issue) - Fix TypeScript compilation error in sortObjectKeys array handling - Replace generic Error with UnauthorizedException and ServiceUnavailableException - Document hardcoded workspace ID limitation in handleIncomingConnection - Remove unused BadRequestException import All tests passing (70/70), TypeScript compiles cleanly, linting passes.
This commit is contained in:
@@ -195,8 +195,10 @@ export class FederationController {
|
||||
): Promise<{ status: string; connectionId?: string }> {
|
||||
this.logger.log(`Received connection request from ${dto.instanceId}`);
|
||||
|
||||
// For now, create connection in default workspace
|
||||
// TODO: Allow configuration of which workspace handles incoming connections
|
||||
// LIMITATION: Incoming connections are created in a default workspace
|
||||
// TODO: Future enhancement - Allow configuration of which workspace handles incoming connections
|
||||
// This could be based on routing rules, instance configuration, or a dedicated federation workspace
|
||||
// For now, uses DEFAULT_WORKSPACE_ID environment variable or falls back to "default"
|
||||
const workspaceId = process.env.DEFAULT_WORKSPACE_ID ?? "default";
|
||||
|
||||
const connection = await this.connectionService.handleIncomingConnectionRequest(
|
||||
|
||||
Reference in New Issue
Block a user