1
0
mirror of https://github.com/bitwarden/server.git synced 2025-07-05 18:12:48 -05:00

[PM-4168] update keys for WebAuthnLoginCredential (#3506)

* allow update of webauthnlogincredential

* Added Tests

* fixed tests to use commands

* addressing various feedback items
This commit is contained in:
Ike
2023-12-15 13:38:34 -08:00
committed by GitHub
parent d488ebec0f
commit 767c58466c
8 changed files with 286 additions and 22 deletions

View File

@ -44,4 +44,15 @@ public class WebAuthnCredentialRepository : Repository<WebAuthnCredential, Guid>
return results.ToList();
}
}
public async Task<bool> UpdateAsync(WebAuthnCredential credential)
{
using var connection = new SqlConnection(ConnectionString);
var affectedRows = await connection.ExecuteAsync(
$"[{Schema}].[{Table}_Update]",
credential,
commandType: CommandType.StoredProcedure);
return affectedRows > 0;
}
}