mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-27 12:44:55 +00:00
Add endpoint to check email and project existence
This commit is contained in:
@ -6,6 +6,8 @@ import { ControllerRoute } from '@app/common/constants/controller-route';
|
||||
import { BaseResponseDto } from '@app/common/dto/base.response.dto';
|
||||
import { PermissionsGuard } from 'src/guards/permissions.guard';
|
||||
import { Permissions } from 'src/decorators/permissions.decorator';
|
||||
import { JwtAuthGuard } from '@app/common/guards/jwt.auth.guard';
|
||||
import { CheckEmailDto } from '../dtos/check-email.dto';
|
||||
|
||||
@ApiTags('Invite User Module')
|
||||
@Controller({
|
||||
@ -34,4 +36,19 @@ export class InviteUserController {
|
||||
user.role.type,
|
||||
);
|
||||
}
|
||||
|
||||
@ApiBearerAuth()
|
||||
@UseGuards(JwtAuthGuard)
|
||||
@Post('check-email')
|
||||
@ApiOperation({
|
||||
summary: ControllerRoute.INVITE_USER.ACTIONS.CHECK_EMAIL_SUMMARY,
|
||||
description: ControllerRoute.INVITE_USER.ACTIONS.CHECK_EMAIL_DESCRIPTION,
|
||||
})
|
||||
async checkEmailAndProject(
|
||||
@Body() addUserInvitationDto: CheckEmailDto,
|
||||
): Promise<BaseResponseDto> {
|
||||
return await this.inviteUserService.checkEmailAndProject(
|
||||
addUserInvitationDto,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user