Skip to content

Commit

Permalink
[Hotfix][Duy] Return user information when logging in
Browse files Browse the repository at this point in the history
  • Loading branch information
duykasama committed Mar 17, 2024
1 parent 7e4839b commit 9af16dc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Domus.Service/Implementations/AuthService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using AutoMapper;
using Domus.Common.Helpers;
using Domus.DAL.Interfaces;
using Domus.Domain.Dtos;
using Domus.Domain.Entities;
using Domus.Service.Constants;
using Domus.Service.Exceptions;
Expand Down Expand Up @@ -73,7 +74,8 @@ public async Task<ServiceActionResult> LoginAsync(LoginRequest request)
}
};

return new ServiceActionResult(true) { Data = response };
var returnedUser = _mapper.Map<DtoDomusUser>(user);
return new ServiceActionResult(true) { Data = new { userInfo = returnedUser, token = response } };
}

public async Task<ServiceActionResult> RefreshTokenAsync(RefreshTokenRequest request)
Expand Down

0 comments on commit 9af16dc

Please sign in to comment.