add code to support nodes providing their own time (in support of satellite modes)
#72
This commit is contained in:
parent
1943895eec
commit
380b976f3d
@ -38,7 +38,13 @@ namespace WindowsDataCenter
|
||||
public IHttpActionResult PostData([FromBody] CardData cData)
|
||||
{
|
||||
int logId;
|
||||
var resp = _repo.LogEventTime(new Identifier {UniqueId = cData.CardUId}, out logId);
|
||||
|
||||
var id = new Identifier {UniqueId = cData.CardUId};
|
||||
|
||||
var resp = cData.UtcTimeStamp.HasValue
|
||||
? _repo.LogEventTime(id, out logId, cData.UtcTimeStamp.Value)
|
||||
: _repo.LogEventTime(id, out logId);
|
||||
|
||||
_logger.Trace("Received new \"Swipe Event\" for UId: {0} at {1}, direction is : {2}", cData.CardUId,
|
||||
DateTime.UtcNow, resp.Direction);
|
||||
return Ok(new {Id = logId, resp.Direction});
|
||||
|
||||
Loading…
Reference in New Issue
Block a user