Fix claims.
Use OID instead of email for microsoft identifier. Fix PlayerCount route. Add created date to user table. Create spectator icon.
This commit is contained in:
@@ -74,13 +74,7 @@ public class SessionsController : ControllerBase
|
||||
[HttpGet("PlayerCount")]
|
||||
public async Task<ActionResult<ReadSessionsPlayerCountResponse>> GetSessionsPlayerCount()
|
||||
{
|
||||
var sessions = await this.queryRespository.ReadSessionPlayerCount();
|
||||
|
||||
return Ok(new ReadSessionsPlayerCountResponse
|
||||
{
|
||||
PlayerHasJoinedSessions = Array.Empty<SessionMetadata>(),
|
||||
AllOtherSessions = sessions.ToList()
|
||||
});
|
||||
return Ok(await this.queryRespository.ReadSessionPlayerCount(this.User.GetShogiUserId()));
|
||||
}
|
||||
|
||||
[HttpGet("{name}")]
|
||||
|
||||
@@ -42,7 +42,7 @@ public class UserController : ControllerBase
|
||||
public ActionResult<CreateTokenResponse> GetWebSocketToken()
|
||||
{
|
||||
var userId = User.GetShogiUserId();
|
||||
var displayName = User.DisplayName();
|
||||
var displayName = User.GetShogiUserDisplayname();
|
||||
|
||||
var token = tokenCache.GenerateToken(userId);
|
||||
return new CreateTokenResponse
|
||||
@@ -74,7 +74,7 @@ public class UserController : ControllerBase
|
||||
{
|
||||
var signOutTask = HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
|
||||
var userId = User?.GetGuestUserId();
|
||||
var userId = User?.GetShogiUserId();
|
||||
if (!string.IsNullOrEmpty(userId))
|
||||
{
|
||||
connectionManager.Unsubscribe(userId);
|
||||
|
||||
Reference in New Issue
Block a user