1
0
mirror of https://github.com/bitwarden/server synced 2025-12-25 12:43:14 +00:00

Added API for getting the current user's account revision date

This commit is contained in:
Kyle Spearrin
2017-01-14 10:02:37 -05:00
parent fd961dfdf6
commit 4e790fcfa3
7 changed files with 46 additions and 4 deletions

View File

@@ -36,6 +36,19 @@ namespace Bit.Core.Repositories.SqlServer
}
}
public async Task<DateTime> GetAccountRevisionDateAsync(Guid id)
{
using(var connection = new SqlConnection(ConnectionString))
{
var results = await connection.QueryAsync<DateTime>(
$"[{Schema}].[{Table}_ReadAccountRevisionDateById]",
new { Id = id },
commandType: CommandType.StoredProcedure);
return results.SingleOrDefault();
}
}
public override async Task ReplaceAsync(User user)
{
await base.ReplaceAsync(user);