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:
@ -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")]
|
||||
|
Reference in New Issue
Block a user