Compare commits
No commits in common. "2f4bdd95f805a92ea29e4c5ff3b9ae783b44e630" and "4a07b1bcc245de015bce4cbae98a3c5f6f2147f0" have entirely different histories.
2f4bdd95f8
...
4a07b1bcc2
|
|
@ -1,6 +1,5 @@
|
|||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
using AyCode.Interfaces.Entities;
|
||||
using AyCode.Interfaces.TimeStampInfo;
|
||||
using TIAM.Entities.Products;
|
||||
|
|
@ -15,9 +14,7 @@ public class UserProductMapping : IEntityGuid, ITimeStampInfo
|
|||
public Guid UserId { get; set; }
|
||||
public Guid ProductId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public virtual User User { get; set; }
|
||||
[JsonIgnore]
|
||||
public virtual Product Product { get; set; }
|
||||
|
||||
public DateTime Created { get; set; }
|
||||
|
|
|
|||
|
|
@ -340,17 +340,11 @@ namespace TIAMWebApp.Server.Controllers
|
|||
[AllowAnonymous]
|
||||
[HttpPost]
|
||||
[Route("GetUserById")]
|
||||
public User? GetUserById([FromBody] Guid id)
|
||||
public async Task<User?> GetUserById([FromBody] Guid id)
|
||||
{
|
||||
Logger.Info($"GetUserById called with id: {id}");
|
||||
var result = _userDal.GetUserById(id);
|
||||
var b = result.UserProductMappings.FirstOrDefault(x => x.Id != null);
|
||||
|
||||
var a = JsonSerializer.Serialize(result);
|
||||
|
||||
|
||||
Console.WriteLine($"GetUserById result: {a}");
|
||||
return result;
|
||||
return await _userDal.GetUserByIdAsync(id);
|
||||
}
|
||||
|
||||
private bool VerifyPassword(string password, string hashedPassword)
|
||||
|
|
|
|||
Loading…
Reference in New Issue