diff --git a/Yavsc/ApiControllers/ChatApiController.cs b/Yavsc/ApiControllers/ChatApiController.cs index d3ef26c6..cd5e8779 100644 --- a/Yavsc/ApiControllers/ChatApiController.cs +++ b/Yavsc/ApiControllers/ChatApiController.cs @@ -24,7 +24,7 @@ namespace Yavsc.Controllers [HttpGet("users")] public IEnumerable GetUserList() { - + List result = new List(); var cxsQuery = dbContext.Connections?.Include(c=>c.Owner).GroupBy( c => c.ApplicationUserId ); // List result = new List(); @@ -37,12 +37,12 @@ namespace Yavsc.Controllers if (cxs.Count>0) { var user = cxs.First().Owner; - yield return new ChatUserInfo { UserName = user.UserName, + result.Add(new ChatUserInfo { UserName = user.UserName, UserId = user.Id, Avatar = user.Avatar, Connections = cxs, - Roles = ( userManager.GetRolesAsync(user) ).Result.ToArray() }; + Roles = ( userManager.GetRolesAsync(user) ).Result.ToArray() }); } } - + return result; } } } diff --git a/Yavsc/Views/Home/Chat.cshtml b/Yavsc/Views/Home/Chat.cshtml index 6adae953..f1d45341 100644 --- a/Yavsc/Views/Home/Chat.cshtml +++ b/Yavsc/Views/Home/Chat.cshtml @@ -16,14 +16,20 @@ color: black; font-family: monospace; font-style: bold; + background-color: yellow; }
- -
    +
    +

    Salons

    +
    • Public
    +

    Utilisateurs

    +
    + +
    @@ -52,42 +58,43 @@