@@ -305,6 +305,35 @@ export class UsersController {
305305 } ;
306306 }
307307
308+ @ApiNotFoundResponse ( {
309+ description : 'User not found' ,
310+ } )
311+ @ApiOkResponse ( {
312+ type : ActivateAllInboundsResponseDto ,
313+ description : 'All inbounds activated successfully' ,
314+ } )
315+ @ApiOperation ( {
316+ summary : 'Activate All Inbounds' ,
317+ description : 'Activate all inbounds' ,
318+ } )
319+ @ApiParam ( { name : 'uuid' , type : String , description : 'UUID of the user' , required : true } )
320+ @HttpCode ( HttpStatus . OK )
321+ @Patch ( USERS_ROUTES . ACTIVATE_ALL_INBOUNDS + '/:uuid' )
322+ async activateAllInbounds (
323+ @Param ( ) paramData : ActivateAllInboundsRequestDto ,
324+ ) : Promise < ActivateAllInboundsResponseDto > {
325+ const result = await this . usersService . activateAllInbounds ( paramData . uuid ) ;
326+
327+ const data = errorHandler ( result ) ;
328+ return {
329+ response : new GetUserResponseModel (
330+ data . user ,
331+ data . lastConnectedNode ,
332+ this . subPublicDomain ,
333+ ) ,
334+ } ;
335+ }
336+
308337 /* get by methods
309338
310339
@@ -484,33 +513,4 @@ export class UsersController {
484513 response : data . map ( ( item ) => new GetFullUserResponseModel ( item , this . subPublicDomain ) ) ,
485514 } ;
486515 }
487-
488- @ApiNotFoundResponse ( {
489- description : 'User not found' ,
490- } )
491- @ApiOkResponse ( {
492- type : ActivateAllInboundsResponseDto ,
493- description : 'All inbounds activated successfully' ,
494- } )
495- @ApiOperation ( {
496- summary : 'Activate All Inbounds' ,
497- description : 'Activate all inbounds' ,
498- } )
499- @ApiParam ( { name : 'uuid' , type : String , description : 'UUID of the user' , required : true } )
500- @HttpCode ( HttpStatus . OK )
501- @Patch ( USERS_ROUTES . ACTIVATE_ALL_INBOUNDS + '/:uuid' )
502- async activateAllInbounds (
503- @Param ( ) paramData : ActivateAllInboundsRequestDto ,
504- ) : Promise < ActivateAllInboundsResponseDto > {
505- const result = await this . usersService . activateAllInbounds ( paramData . uuid ) ;
506-
507- const data = errorHandler ( result ) ;
508- return {
509- response : new GetUserResponseModel (
510- data . user ,
511- data . lastConnectedNode ,
512- this . subPublicDomain ,
513- ) ,
514- } ;
515- }
516516}
0 commit comments