diff --git a/app/lib/login/cubit.dart b/app/lib/login/cubit.dart index 90f19d25..ff68db3c 100644 --- a/app/lib/login/cubit.dart +++ b/app/lib/login/cubit.dart @@ -36,7 +36,7 @@ class LoginCubit extends Cubit { ? context.l10n.auth_loading_data // ignore: use_build_context_synchronously : context.l10n.auth_updating_data; - emit(LoginState.loadingUserData(loadingMessage, )); + emit(LoginState.loadingUserData(loadingMessage)); if (shouldFetchDiplotypes()) { final (labData, activeDrugList) = await lab.loadData(); await saveDiplotypesAndActiveDrugs( diff --git a/app/lib/login/models/dummy_demo_lab.dart b/app/lib/login/models/dummy_demo_lab.dart new file mode 100644 index 00000000..3eddfc26 --- /dev/null +++ b/app/lib/login/models/dummy_demo_lab.dart @@ -0,0 +1,16 @@ +import '../../common/module.dart'; +import 'lab.dart'; + +class DummyDemoLab extends Lab { + DummyDemoLab({ + required super.name, + required this.dataUrl, + }); + + Uri dataUrl; + + @override + Future<(List, List)> loadData() async { + return Lab.fetchData(dataUrl); + } +} \ No newline at end of file diff --git a/app/lib/login/pages/login.dart b/app/lib/login/pages/login.dart index 893920c4..20eb63a2 100644 --- a/app/lib/login/pages/login.dart +++ b/app/lib/login/pages/login.dart @@ -6,15 +6,15 @@ import 'package:provider/provider.dart'; import '../../../common/module.dart'; import '../cubit.dart'; import '../models/deep_link_share_flow_lab.dart'; +import '../models/dummy_demo_lab.dart'; import '../models/lab.dart'; -import '../models/oauth_authorization_code_flow_lab.dart'; final labs = [ - OAuthAuthorizationCodeFlowLab( + DummyDemoLab( name: 'Mount Sinai Health System', - authUrl: Uri.http('vm-slosarek01.dhclab.i.hpi.de:28080', 'realms/pharme/protocol/openid-connect/auth'), - tokenUrl: Uri.http('vm-slosarek01.dhclab.i.hpi.de:28080', 'realms/pharme/protocol/openid-connect/token'), - dataUrl: Uri.http('vm-slosarek01.dhclab.i.hpi.de:8081', 'api/v1/star-alleles'), + dataUrl: Uri.parse( + 'https://hpi-datastore.duckdns.org/userdata?id=66608824-2ab4-4f03-aef0-03aa007337d3', + ), ) ];