mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2026-10-23 15:57:55 +00:00
Implemented sign up and otp screens
This commit is contained in:
@@ -24,12 +24,21 @@ class AuthenticationAPI {
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future<Token> signUp({required SignUpModel model}) async {
|
||||
static Future<bool> signUp({required SignUpModel model}) async {
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.signUp,
|
||||
body: model.toJson(),
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) => Token.fromJson(json['data']));
|
||||
expectedResponseModel: (json) => json['statusCode'] == 201);
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> sendOtp({required Map<String, dynamic> body}) async {
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.sendOtp,
|
||||
body: body,
|
||||
showServerMessage: false,
|
||||
expectedResponseModel: (json) => json['data']);
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user