casse mniuscule pour les champ de l'API
This commit is contained in:
parent
de438b1d43
commit
28ef3313af
1 changed files with 11 additions and 7 deletions
|
|
@ -1,20 +1,24 @@
|
||||||
|
using System.Linq;
|
||||||
|
|
||||||
namespace Yavsc.Models.Auth
|
namespace Yavsc.Models.Auth
|
||||||
{
|
{
|
||||||
public class Me {
|
public class Me {
|
||||||
public Me(ApplicationUser user)
|
public Me(ApplicationUser user)
|
||||||
{
|
{
|
||||||
Id = user.Id;
|
id = user.Id;
|
||||||
GivenName = user.UserName;
|
givenName = user.UserName;
|
||||||
Emails = new string [] { user.Email } ;
|
emails = new string [] { user.Email } ;
|
||||||
|
roles = user.Roles.Select(r=>r.RoleId).ToArray();
|
||||||
}
|
}
|
||||||
public string Id { get; set; }
|
public string id { get; set; }
|
||||||
public string GivenName { get; set; }
|
public string givenName { get; set; }
|
||||||
public string[] Emails { get; set; }
|
public string[] emails { get; set; }
|
||||||
|
public string[] roles { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Known as profile, could point to an avatar
|
/// Known as profile, could point to an avatar
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public string Url { get; set; }
|
public string url { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue