Merge branch 'InvestigateUnassociatedCardsGapBehaviour-_41' into Release0.1.3

This commit is contained in:
chris.watts90@outlook.com 2017-02-23 21:03:49 +00:00
commit 6f9966e426

View File

@ -351,7 +351,9 @@ namespace SQLiteRepository
var logDirection = GetLogDirection(ident.UserId_FK);
#region Check the user hasnt registered an event in the last few minutes..
//BUG: what happens if unassociated cards are swiped within the threshold? need to get all of them.
if (ident.UserId_FK!=-1)
{ //only check log gap if the card is associated to a user
var hysteresisThresholdMinutes = Convert.ToInt32(ConfigurationManager.AppSettings["SwipeTimeGap"] ?? "3");
var threshold = DateTime.UtcNow.AddMinutes(0 - hysteresisThresholdMinutes);
var logs = _connection.Query<TimeLogDb>(
@ -364,6 +366,7 @@ namespace SQLiteRepository
logId = -1;
return OperationResponse.FAILED;
}
}
#endregion