using FictionArchive.Service.Shared.Services.EventBus; using FictionArchive.Service.UserService.Models.IntegrationEvents; using FictionArchive.Service.UserService.Models.Database; using Microsoft.EntityFrameworkCore; // Add this line to include the UserModel namespace FictionArchive.Service.UserService.Services.EventHandlers; public class AuthUserAddedEventHandler : IIntegrationEventHandler { private readonly UserManagementService _userManagementService; private readonly ILogger _logger; public AuthUserAddedEventHandler(UserServiceDbContext dbContext, ILogger logger, UserManagementService userManagementService) { _logger = logger; _userManagementService = userManagementService; } public async Task Handle(AuthUserAddedEvent @event) { await _userManagementService.RegisterUser(@event.EventUserUsername, @event.EventUserEmail, @event.OAuthProviderId, @event.InviterOAuthProviderId); } }