Commit 502813d2 authored by Leon Tappe's avatar Leon Tappe 🔥
Browse files

clean up

parent 58c702c7
......@@ -136,9 +136,7 @@ class _ServerSettingsPageState extends State<ServerSettingsPage> {
final response = await _adminApi!.updateSetting(key, result.toString());
_settings[key] = RuntimeSetting.fromMap(json.decode(response.values.single));
} else if (result is int) {
print(result.toString());
final response = await _adminApi!.updateSetting(key, result.toString());
print(response);
setState(() => _settings[key] = int.tryParse(response.values.single));
}
}
......
......@@ -304,7 +304,7 @@ class _UserViewState extends State<UserView> {
_recoveredRuntime = settings['runtime_recovered'] as RuntimeSetting;
_vaccinatedRuntime = settings['runtime_vaccinated'] as RuntimeSetting;
_recoveredMinAge = settings['min_age_recovered'] as int;
_recoveredMinAge = int.tryParse(settings['min_age_recovered']) ?? _recoveredMinAge;
_motd = settings['motd_internal'] ?? '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment