Remove trailing slash from custom server

Closes #37
This commit is contained in:
Roland Geider
2021-09-08 17:55:26 +02:00
parent 386ebcf30c
commit efde66e01b

View File

@@ -284,7 +284,11 @@ class _AuthCardState extends State<AuthCard> {
return null;
},
onSaved: (value) {
_authData['serverUrl'] = value!;
// Remove any trailing slash
if (value!.lastIndexOf('/') == (value.length - 1)) {
value = value.substring(0, value.lastIndexOf('/'));
}
_authData['serverUrl'] = value;
},
),
),