Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
juuwel committed May 8, 2024
1 parent a4ee2ce commit 19d00a2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Core/Services/UserService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ public async Task CreateUser(RegisterUserDto registerUserDto)
return user == null ? null : jwtService.IssueJwt(user);
}

public async Task<User?> GetUserByEmail(string email)
public async Task<User> GetUserByEmail(string email)
{
return await userRepository.GetUserByEmail(email);
var user = await userRepository.GetUserByEmail(email);
if (user == null) throw new NotFoundException();
return user;
}

public async Task<GetUserDto?> UpdateUser(UpdateUserDto updateUserDto)
Expand Down
3 changes: 2 additions & 1 deletion api/Events/Auth/Client/ClientWantsToLogIn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using Core.Services;
using Fleck;
using lib;
using Shared.Dtos;
using Shared.Dtos.FromClient;
using Shared.Dtos.FromClient.Identity;
using Shared.Exceptions;
Expand All @@ -14,7 +15,7 @@ public class ClientWantsToLogInDto : BaseDto
public LoginDto LoginDto { get; set; } = null!;
}

public class ClientWantsToLogIn(WebSocketConnectionService connectionService, UserService userService)
public class ClientWantsToLogIn(UserService userService)
: BaseEventHandler<ClientWantsToLogInDto>
{
public override async Task Handle(ClientWantsToLogInDto dto, IWebSocketConnection socket)
Expand Down

0 comments on commit 19d00a2

Please sign in to comment.