Skip to content

Commit

Permalink
Add EmailValidationKeyModelHelper to ThirdpartyController
Browse files Browse the repository at this point in the history
Included EmailValidationKeyModelHelper to the constructor and adjusted the invitation data retrieval to use the model's UiD. This change enhances the validation process for email invitations.
  • Loading branch information
pavelbannov committed Aug 5, 2024
1 parent 918d3eb commit 8a45974
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions products/ASC.People/Server/Api/ThirdpartyController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ public class ThirdpartyController(
FileSecurity fileSecurity,
UsersInRoomChecker usersInRoomChecker,
IDistributedLockProvider distributedLockProvider,
LoginProfileTransport loginProfileTransport)
LoginProfileTransport loginProfileTransport,
EmailValidationKeyModelHelper emailValidationKeyModelHelper)
: ApiControllerBase
{

Expand Down Expand Up @@ -186,8 +187,9 @@ public async Task SignupAccountAsync(SignupAccountRequestDto inDto)
{
throw new Exception(Resource.ErrorNotCorrectEmail);
}

var linkData = await invitationService.GetInvitationDataAsync(inDto.Key, inDto.Email, inDto.EmployeeType ?? EmployeeType.RoomAdmin);

var model = emailValidationKeyModelHelper.GetModel();
var linkData = await invitationService.GetInvitationDataAsync(inDto.Key, inDto.Email, inDto.EmployeeType ?? EmployeeType.RoomAdmin, model?.UiD);

if (!linkData.IsCorrect)
{
Expand Down

0 comments on commit 8a45974

Please sign in to comment.