1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-03 00:52:49 -05:00

added cipher history API for data syncing with client databases

This commit is contained in:
Kyle Spearrin
2016-06-08 20:40:20 -04:00
parent 6861303586
commit 89e524e1e4
6 changed files with 86 additions and 0 deletions

View File

@ -0,0 +1,24 @@
CREATE PROCEDURE [dbo].[Cipher_ReadByRevisionDateUserWithDeleteHistory]
@SinceRevisionDate DATETIME2(7),
@UserId UNIQUEIDENTIFIER
AS
BEGIN
SET NOCOUNT ON
SELECT
*
FROM
[dbo].[CipherView]
WHERE
[RevisionDate] > @SinceRevisionDate
AND [UserId] = @UserId
SELECT
[CipherId]
FROM
[dbo].[History]
WHERE
[Date] > @SinceRevisionDate
AND [Event] = 2 -- Only cipher delete events.
AND [UserId] = @UserId
END