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:
2023-01-20 20:48:38 -06:00
parent 1d0beaf69f
commit 26fd955aa4
35 changed files with 672 additions and 1426 deletions

View File

@@ -1,13 +1,31 @@
CREATE PROCEDURE [session].[ReadSessionPlayerCount]
@PlayerName [user].UserName
AS
BEGIN
SET NOCOUNT ON;
DECLARE @PlayerId as BIGINT;
SELECT @PlayerId = Id
FROM [user].[User]
WHERE [Name] = @PlayerName;
-- Result set of sessions which @PlayerName participates in.
SELECT
[Name],
CASE
WHEN Player2Id IS NULL THEN 1
ELSE 2
END AS PlayerCount
FROM [session].[Session];
FROM [session].[Session]
WHERE Player1Id = @PlayerId OR Player2Id = @PlayerId;
-- Result set of sessions which @PlayerName does not participate in.
SELECT
[Name],
CASE
WHEN Player2Id IS NULL THEN 1
ELSE 2
END AS PlayerCount
FROM [session].[Session]
WHERE Player1Id <> @PlayerId AND ISNULL(Player2Id, 0) <> @PlayerId;
END