File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -224,6 +224,7 @@ export class CompanyInfoController {
224224 type : InvitedUserInCompanyAndConnectionGroupDs ,
225225 } )
226226 @UseGuards ( CompanyAdminGuard )
227+ @Throttle ( { default : { limit : isTest ( ) ? 200 : 10 , ttl : 60000 } } )
227228 @Put ( 'user/:companyId' )
228229 async inviteUserInCompanyAndConnectionGroup (
229230 @UserId ( ) userId : string ,
Original file line number Diff line number Diff line change @@ -71,6 +71,8 @@ import { UserSettingsDataRequestDto } from './dto/user-settings-data-request.dto
7171import { RequestRestUserPasswordDto } from './dto/request-rest-user-password.dto.js' ;
7272import { SuccessResponse } from '../../microservices/saas-microservice/data-structures/common-responce.ds.js' ;
7373import { Timeout } from '../../decorators/timeout.decorator.js' ;
74+ import { Throttle } from '@nestjs/throttler' ;
75+ import { isTest } from '../../helpers/app/is-test.js' ;
7476
7577@UseInterceptors ( SentryInterceptor )
7678@Timeout ( )
@@ -143,6 +145,7 @@ export class UserController {
143145 description : 'Login successful.' ,
144146 type : TokenExpDs ,
145147 } )
148+ @Throttle ( { default : { limit : isTest ( ) ? 200 : 5 , ttl : 60000 } } )
146149 @Post ( 'user/login/' )
147150 async usualLogin (
148151 @Res ( { passthrough : true } ) response : Response ,
You can’t perform that action at this time.
0 commit comments