From 8066f485936d826901c50c6cdec7b9eac928495e Mon Sep 17 00:00:00 2001 From: huydoan961z <144944736+huydoan961z@users.noreply.github.com> Date: Thu, 20 Nov 2025 23:45:28 +0700 Subject: [PATCH] add relation --- .../Services/Event/RegistrationService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EventPlatform.Infrastructure/Services/Event/RegistrationService.cs b/EventPlatform.Infrastructure/Services/Event/RegistrationService.cs index a3e350a..3585d5a 100644 --- a/EventPlatform.Infrastructure/Services/Event/RegistrationService.cs +++ b/EventPlatform.Infrastructure/Services/Event/RegistrationService.cs @@ -212,7 +212,7 @@ public async Task GetJoinMeetingInfoAsync(Guid registrationI var registration = await _context.Registrations .Include(r => r.TicketType) .ThenInclude(tt => tt.Event) - .Include(u=> u.User) + .Include(u => u.User) .FirstOrDefaultAsync(r => r.RegistrationId == registrationId && r.UserId == currentUserId.Value); if (registration == null) @@ -239,7 +239,7 @@ public async Task GetJoinMeetingInfoAsync(Guid registrationI StartTime = eventEntity.StartTime, EndTime = eventEntity.EndTime, RoomId = roomId, - Role = "Host", + Role = registration.User?.Role ?? "User", UserName = userName, UserIdentifier = userIdentifier };