mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-07-17 10:35:10 +00:00
password_changes&_routine_changes
This commit is contained in:
@ -5,7 +5,8 @@ import 'package:syncrow_app/services/api/api_links_endpoints.dart';
|
||||
import 'package:syncrow_app/services/api/http_service.dart';
|
||||
|
||||
class AuthenticationAPI {
|
||||
static Future<Map<String, dynamic>> verifyPassCode({required Map<String, dynamic> body}) async {
|
||||
static Future<Map<String, dynamic>> verifyPassCode(
|
||||
{required Map<String, dynamic> body}) async {
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.verifyOtp,
|
||||
body: body,
|
||||
@ -14,7 +15,8 @@ class AuthenticationAPI {
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future<Token> loginWithEmail({required LoginWithEmailModel model}) async {
|
||||
static Future<Token> loginWithEmail(
|
||||
{required LoginWithEmailModel model}) async {
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.login,
|
||||
body: model.toJson(),
|
||||
@ -32,7 +34,8 @@ class AuthenticationAPI {
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> sendOtp({required Map<String, dynamic> body}) async {
|
||||
static Future<Map<String, dynamic>> sendOtp(
|
||||
{required Map<String, dynamic> body}) async {
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.sendOtp,
|
||||
body: body,
|
||||
@ -41,8 +44,16 @@ class AuthenticationAPI {
|
||||
return response;
|
||||
}
|
||||
|
||||
static Future<Map<String, dynamic>> forgetPassword({required String email,required String password ,}) async {
|
||||
Map<String, dynamic> params = {"email": email, "password": password,};
|
||||
static Future<Map<String, dynamic>> forgetPassword({
|
||||
required String otpCode,
|
||||
required String email,
|
||||
required String password,
|
||||
}) async {
|
||||
Map<String, dynamic> params = {
|
||||
"email": email,
|
||||
"password": password,
|
||||
"otpCode": otpCode
|
||||
};
|
||||
final response = await HTTPService().post(
|
||||
path: ApiEndpoints.forgetPassword,
|
||||
body: params,
|
||||
|
Reference in New Issue
Block a user