Updated Session extensions and Route Contoller
Increased the number of Poll requests and disabled an irrelevant error stating that there was a cyclical struture (Just a Doubly Linked List)
This commit is contained in:
parent
924e25e1c6
commit
3cb2b9c9b5
@ -127,7 +127,7 @@ namespace EFB.Controllers
|
|||||||
Dictionary<string, string> headerData = new Dictionary<string, string>();
|
Dictionary<string, string> headerData = new Dictionary<string, string>();
|
||||||
headerData.Add("Authorization", $"Bearer {user.UserToken.TokenValue}");
|
headerData.Add("Authorization", $"Bearer {user.UserToken.TokenValue}");
|
||||||
|
|
||||||
while (collected == false && pollCount < 3)
|
while (collected == false && pollCount < 15)
|
||||||
{
|
{
|
||||||
//Make Polling Request
|
//Make Polling Request
|
||||||
var pollingRequest = API.Put<List<PollResponse>>($"https://api.autorouter.aero/v1.0/router/{user.RouteToken.TokenValue}/longpoll", headerData, null);
|
var pollingRequest = API.Put<List<PollResponse>>($"https://api.autorouter.aero/v1.0/router/{user.RouteToken.TokenValue}/longpoll", headerData, null);
|
||||||
|
@ -88,7 +88,7 @@ namespace EFB.Models
|
|||||||
route.Current.Next = route.Arrival;
|
route.Current.Next = route.Arrival;
|
||||||
route.Arrival.Previous = route.Current;
|
route.Arrival.Previous = route.Current;
|
||||||
|
|
||||||
route.Current = null;
|
route.Current = route.Departure;
|
||||||
|
|
||||||
return route;
|
return route;
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,11 @@ namespace EFB.Sessions
|
|||||||
{
|
{
|
||||||
public static void SetObject(this ISession session, string key, object value)
|
public static void SetObject(this ISession session, string key, object value)
|
||||||
{//Sets the object of a session to Object
|
{//Sets the object of a session to Object
|
||||||
session.SetString(key, JsonConvert.SerializeObject(value));
|
session.SetString(key, JsonConvert.SerializeObject(value, Formatting.None,
|
||||||
|
new JsonSerializerSettings(){
|
||||||
|
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
|
||||||
|
}
|
||||||
|
));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static T GetObject<T>(this ISession session, string key)
|
public static T GetObject<T>(this ISession session, string key)
|
||||||
|
Loading…
Reference in New Issue
Block a user