Get api/Login -> WhoAmI

This commit is contained in:
MarcEricMartel
2022-10-31 07:12:25 -07:00
parent 63a02da413
commit afc5354d0f
4 changed files with 41 additions and 11 deletions

View File

@@ -0,0 +1,20 @@
using GrossesMitainesAPI.Data;
namespace GrossesMitainesAPI.Models;
public class ReturnUserViewModel {
public string Username { get; set; }
public string Email { get; set; }
public string Phone { get; set; }
public bool EmailConfirmed { get; set; }
public bool PhoneConfirmed { get; set; }
public bool TwoFactorEnable { get; set; }
public ReturnUserViewModel(InventoryUser user) {
Username = user.UserName;
Email = user.Email;
Phone = user.PhoneNumber;
EmailConfirmed = user.EmailConfirmed;
PhoneConfirmed = user.PhoneNumberConfirmed;
TwoFactorEnable = user.TwoFactorEnabled;
}
}