@@ -33,7 +33,7 @@ const teamsCreate: ValidatedEventAPIGatewayProxyEvent<typeof schema> = async (ev
3333 } ) ,
3434 } ;
3535 }
36-
36+
3737 if ( teamName . length > 50 ) {
3838 return {
3939 statusCode : 400 ,
@@ -43,7 +43,7 @@ const teamsCreate: ValidatedEventAPIGatewayProxyEvent<typeof schema> = async (ev
4343 } ) ,
4444 } ;
4545 }
46-
46+
4747 // Check for invalid characters (only allow alphanumeric, spaces, hyphens, underscores)
4848 const validNamePattern = / ^ [ a - z A - Z 0 - 9 \s \- _ ] + $ / ;
4949 if ( ! validNamePattern . test ( teamName ) ) {
@@ -157,7 +157,7 @@ const teamsCreate: ValidatedEventAPIGatewayProxyEvent<typeof schema> = async (ev
157157
158158 // Use MongoDB transaction for atomic team creation
159159 const session = db . getClient ( ) . startSession ( ) ;
160-
160+
161161 try {
162162 await session . withTransaction ( async ( ) => {
163163 // Create team within transaction
@@ -182,9 +182,8 @@ const teamsCreate: ValidatedEventAPIGatewayProxyEvent<typeof schema> = async (ev
182182 // Send invitations to all members via teamInviteLogic utility
183183 const inviteResult = await teamInviteLogic ( event . body . auth_email , event . body . auth_token , teamId , memberEmails ) ;
184184
185- if ( inviteResult . statusCode !== 200 )
185+ if ( inviteResult . statusCode !== 200 )
186186 throw new Error ( `Team invite failed with status ${ inviteResult . statusCode } : ${ inviteResult . body } ` ) ;
187-
188187 } ) ;
189188 } catch ( transactionError ) {
190189 console . error ( 'Transaction failed:' , transactionError ) ;
0 commit comments