mirror of
https://github.com/bitwarden/server.git
synced 2024-12-01 13:43:23 +01:00
718ff219ed
* Add stored procedure * Add repository
17 lines
427 B
Transact-SQL
17 lines
427 B
Transact-SQL
CREATE OR ALTER PROCEDURE [dbo].[UserAsymmetricKeys_Regenerate]
|
|
@UserId UNIQUEIDENTIFIER,
|
|
@PublicKey VARCHAR(MAX),
|
|
@PrivateKey VARCHAR(MAX)
|
|
AS
|
|
BEGIN
|
|
SET NOCOUNT ON
|
|
DECLARE @UtcNow DATETIME2(7) = GETUTCDATE();
|
|
|
|
UPDATE [dbo].[User]
|
|
SET [PublicKey] = @PublicKey,
|
|
[PrivateKey] = @PrivateKey,
|
|
[RevisionDate] = @UtcNow,
|
|
[AccountRevisionDate] = @UtcNow
|
|
WHERE [Id] = @UserId
|
|
END
|