From 8a54eda4a029d89848715fa88d9f138968a69d7b Mon Sep 17 00:00:00 2001 From: Robert McRackan Date: Thu, 13 Aug 2020 15:06:22 -0400 Subject: [PATCH] Add temp jsonpath options during v3 => v4 migration prep --- .../UNTESTED/AudibleApiStorage.cs | 19 +++++++------------ LibationLauncher/LibationLauncher.csproj | 2 +- 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/InternalUtilities/UNTESTED/AudibleApiStorage.cs b/InternalUtilities/UNTESTED/AudibleApiStorage.cs index 141531a7..6d9892b9 100644 --- a/InternalUtilities/UNTESTED/AudibleApiStorage.cs +++ b/InternalUtilities/UNTESTED/AudibleApiStorage.cs @@ -14,20 +14,15 @@ namespace InternalUtilities public static string AccountsSettingsFile => Path.Combine(Configuration.Instance.LibationFiles, "AccountsSettings.json"); - public static string GetJsonPath( - //string username - ////, string locale - ) + // TEMP + public static string GetJsonPath() => null; + + public static string GetJsonPath(string username, string locale) { - return null; + var usernameSanitized = JsonConvert.ToString(username); + var localeSanitized = JsonConvert.ToString(locale); - - //var usernameSanitized = JsonConvert.ToString(username); - - ////var localeSanitized = JsonConvert.ToString(locale); - ////return $"$.AccountsSettings[?(@.Username == '{usernameSanitized}' && @.IdentityTokens.Locale == '{localeSanitized}')].IdentityTokens"; - - //return $"$.AccountsSettings[?(@.Username == '{usernameSanitized}')].IdentityTokens"; + return $"$.AccountsSettings[?(@.Username == '{usernameSanitized}' && @.IdentityTokens.Locale == '{localeSanitized}')].IdentityTokens"; } } } diff --git a/LibationLauncher/LibationLauncher.csproj b/LibationLauncher/LibationLauncher.csproj index 4940bc7f..da0a4093 100644 --- a/LibationLauncher/LibationLauncher.csproj +++ b/LibationLauncher/LibationLauncher.csproj @@ -13,7 +13,7 @@ win-x64 - 3.1.12.86 + 3.1.12.88