1
0
mirror of https://github.com/bitwarden/server.git synced 2025-06-14 15:00:49 -05:00

fix : sync sql and migration scripts

This commit is contained in:
Ike Kottlowski 2025-06-12 13:30:12 -04:00
parent b21c3b8ac9
commit 1eb6a0481f
No known key found for this signature in database
GPG Key ID: C86308E3DCA6D76F
2 changed files with 3 additions and 3 deletions

View File

@ -10,12 +10,12 @@ BEGIN
AR.*,
ROW_NUMBER() OVER (PARTITION BY RequestDeviceIdentifier ORDER BY CreationDate DESC) AS rn
FROM dbo.AuthRequestView AR
WHERE Type IN (0, 1)
WHERE Type IN (0, 1) -- 0 = AuthenticateAndUnlock, 1 = Unlock
AND AR.CreationDate >= DATEADD(MINUTE, -@ExpirationMinutes, GETUTCDATE())
AND AR.UserId = @UserId
)
SELECT PR.*
FROM PendingRequests PR
WHERE rn = 1
AND AR.Approved IS NULL;
AND PR.Approved IS NULL;
END;

View File

@ -11,7 +11,7 @@ BEGIN
AR.*,
ROW_NUMBER() OVER (PARTITION BY RequestDeviceIdentifier ORDER BY CreationDate DESC) AS rn
FROM dbo.AuthRequestView AR
WHERE Type IN (0, 1) -- 0 = UnlockAndAUth, 1 = unlock
WHERE Type IN (0, 1) -- 0 = AuthenticateAndUnlock, 1 = Unlock
AND AR.CreationDate >= DATEADD(MINUTE, -@ExpirationMinutes, GETUTCDATE())
AND AR.UserId = @UserId
)