diff --git a/lib/pangea/config/environment.dart b/lib/pangea/config/environment.dart index 473c541d5b..77002fc28e 100644 --- a/lib/pangea/config/environment.dart +++ b/lib/pangea/config/environment.dart @@ -10,10 +10,6 @@ class Environment { static bool get isStaging => synapsURL.contains("staging"); - static String get baseAPI { - return dotenv.env["BASE_API"] ?? 'BASE API not found'; - } - static String get frontendURL { return dotenv.env["FRONTEND_URL"] ?? "Frontend URL NOT FOUND"; } @@ -27,7 +23,17 @@ class Environment { } static String get choreoApi { - return dotenv.env['CHOREO_API'] ?? 'Not found'; + final envEntry = dotenv.env['CHOREO_API']; + if (envEntry == null) { + return "Not found"; + } + if (envEntry.endsWith("/choreo")) { + return envEntry.replaceAll("/choreo", ""); + } + if (envEntry.endsWith("/choreo/")) { + return envEntry.replaceAll("/choreo/", ""); + } + return envEntry; } static String get choreoApiKey { diff --git a/pubspec.yaml b/pubspec.yaml index 8028cd23bc..f51bc9450f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -6,7 +6,7 @@ description: Learn a language while texting your friends. # Pangea# publish_to: none # On version bump also increase the build number for F-Droid -version: 1.23.16+3575 +version: 1.23.17+3576 environment: sdk: ">=3.0.0 <4.0.0"