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

return epoc milliseconds for revision date

This commit is contained in:
Kyle Spearrin
2017-01-14 12:47:44 -05:00
parent 174ac313ea
commit 1bef3a1e5b
2 changed files with 15 additions and 2 deletions

View File

@ -170,10 +170,17 @@ namespace Bit.Api.Controllers
}
[HttpGet("revision-date")]
public async Task<DateTime?> GetAccountRevisionDate()
public async Task<long?> GetAccountRevisionDate()
{
var userId = _userService.GetProperUserId(User);
return userId.HasValue ? (await _userService.GetAccountRevisionDateByIdAsync(userId.Value)) : (DateTime?)null;
long? revisionDate = null;
if(userId.HasValue)
{
var date = await _userService.GetAccountRevisionDateByIdAsync(userId.Value);
revisionDate = Core.Utilities.CoreHelpers.EpocMilliseconds(date);
}
return revisionDate;
}
[HttpGet("two-factor")]