mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
30 lines
806 B
Dart
30 lines
806 B
Dart
import 'package:syncrow_web/pages/auth/model/token.dart';
|
|
import 'api/api_links_endpoints.dart';
|
|
import 'api/http_service.dart';
|
|
|
|
class AuthenticationAPI {
|
|
|
|
|
|
static Future<Token> loginWithEmail({required var model}) async {
|
|
final response = await HTTPService().post(
|
|
path: ApiEndpoints.login,
|
|
body: model.toJson(),
|
|
showServerMessage: false,
|
|
expectedResponseModel: (json) => Token.fromJson(json['data']));
|
|
return response;
|
|
}
|
|
|
|
// static Future<bool> signUp({required SignUpModel model}) async {
|
|
// final response = await HTTPService().post(
|
|
// path: ApiEndpoints.signUp,
|
|
// body: model.toJson(),
|
|
// showServerMessage: false,
|
|
// expectedResponseModel: (json) => json['statusCode'] == 201);
|
|
// return response;
|
|
// }
|
|
|
|
|
|
|
|
|
|
}
|