string replace end of choreo url (#1158)
This commit is contained in:
parent
3d292b2255
commit
d58705dae7
2 changed files with 12 additions and 6 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue