public JObject Diff() { this.Url.ToString(); string sPath = ((Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest) this.Request).Path; string sQuery = ((Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest) this.Request).QueryString.ToString(); if (sPath != "/favicon.ico") { var query = QueryHelpers.ParseQuery(sQuery); string sKey = query.FirstOrDefault(t => t.Key.ToLower() == "id").Value; if (string.IsNullOrEmpty(sKey)) { sKey = Inv.LookupID(query.First().Key, query.First().Value); } if (!int.TryParse(query.FirstOrDefault(t => t.Key.ToLower() == "index").Value, out int index)) { index = 1; } if (!int.TryParse(query.FirstOrDefault(t => t.Key.ToLower() == "mode").Value, out int mode)) { mode = 0; } return(Inv.GetDiff(sKey, index, mode)); } return(null); }
public JObject History() { string sPath = ((Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest) this.Request).Path; string sQuery = ((Microsoft.AspNetCore.Http.Internal.DefaultHttpRequest) this.Request).QueryString.ToString(); if (sPath != "/favicon.ico") { var query = QueryHelpers.ParseQuery(sQuery); string sKey = query.FirstOrDefault(t => t.Key.ToLower() == "id").Value; if (string.IsNullOrEmpty(sKey)) { sKey = Inv.LookupID(query.First().Key, query.First().Value); } return(Inv.GetHistory(sKey)); } return(null); }