mirror of
https://gitlab.com/comunic/comunicmobile
synced 2025-06-19 00:05:16 +00:00
Create login widget
This commit is contained in:
@ -1,4 +1,3 @@
|
||||
import 'package:comunic/helpers/api_helper.dart';
|
||||
import 'package:comunic/helpers/preferences_helper.dart';
|
||||
import 'package:comunic/helpers/push_notifications_helper.dart';
|
||||
import 'package:comunic/helpers/websocket_helper.dart';
|
||||
@ -44,11 +43,10 @@ class AccountHelper {
|
||||
|
||||
/// Sign in user
|
||||
Future<AuthResult> signIn(AuthenticationDetails auth) async {
|
||||
final request = APIRequest(uri: "account/login");
|
||||
request.addString("mail", auth.email);
|
||||
request.addString("password", auth.password);
|
||||
|
||||
final response = await APIHelper().exec(request);
|
||||
final response = await APIRequest.withoutLogin("account/login")
|
||||
.addString("mail", auth.email)
|
||||
.addString("password", auth.password)
|
||||
.exec();
|
||||
|
||||
// Handle errors
|
||||
if (response.code == 401)
|
||||
|
Reference in New Issue
Block a user