#48 cleaned userService. We will use IdentityService only

This commit is contained in:
Dominic Villemure
2024-06-02 14:45:28 -04:00
parent 82b01c9448
commit d5048d3a06
11 changed files with 97 additions and 134 deletions

View File

@@ -1,5 +1,4 @@
using Hutopy.Application.Common.Interfaces;
using Hutopy.Domain.Interfaces;
namespace Hutopy.Application.Users.Queries.GetCurrentUser;
@@ -8,13 +7,13 @@ public record GetCurrentUserQuery : IRequest<UserDto>;
public class GetCurrentUserQueryHandler(
IApplicationDbContext context,
IMapper mapper,
IUserService userService
IIdentityService identityService
)
: IRequestHandler<GetCurrentUserQuery, UserDto>
{
public async Task<UserDto> Handle(GetCurrentUserQuery request, CancellationToken cancellationToken)
{
var identityUser = await userService.GetCurrentUserAsync();
var identityUser = await identityService.GetCurrentUserAsync();
var currentUserId = new Guid(identityUser?.Id ?? "");
var transactions = await context.UserTransactions