Call set server and application version after login

This commit is contained in:
Roland Geider
2021-01-28 12:49:21 +01:00
parent 5cbdb64dea
commit 8d2696dbaf

View File

@@ -73,12 +73,9 @@ class Auth with ChangeNotifier {
Future<void> _authenticate(String username, String password, String serverUrl) async {
var url = '$serverUrl/api/v2/login/';
//print(username);
//print(password);
try {
// Get the server version
await setServerVersion();
final response = await http.post(
url,
@@ -114,6 +111,9 @@ class Auth with ChangeNotifier {
'serverUrl': this.serverUrl,
// 'expiryDate': _expiryDate.toIso8601String(),
});
await setServerVersion();
await setApplicationVersion();
prefs.setString('userData', userData);
} catch (error) {
throw error;