fix for fetching language list

This commit is contained in:
ggurdin 2024-01-16 11:03:28 -05:00
parent 8620028afe
commit 4e4755d0a5
2 changed files with 6 additions and 1 deletions

View file

@ -27,7 +27,6 @@ class Environment {
}
static String get choreoApi {
return "http://localhost:8000/choreo";
return dotenv.env['CHOREO_API'] ?? 'Not found';
}

View file

@ -58,6 +58,12 @@ class PangeaLanguage {
return true;
}
// return true;
final DateTime lastFetchedDate = DateTime.parse(dateString);
final DateTime targetDate = DateTime(2024, 1, 15);
if (lastFetchedDate.isBefore(targetDate)) {
return true;
}
final int lastFetched = DateTime.parse(dateString).millisecondsSinceEpoch;
final int now = DateTime.now().millisecondsSinceEpoch;
const int fetchIntervalInMilliseconds = 86534601;