Change TPIn #3
This commit is contained in:
@@ -67,4 +67,21 @@ class ChangePasswordService {
|
||||
}
|
||||
return response.toString();
|
||||
}
|
||||
|
||||
Future validateChangeTpin({
|
||||
required String oldTpin,
|
||||
required String newTpin,
|
||||
}) async {
|
||||
final response = await _dio.post(
|
||||
'/api/auth/change/tpin',
|
||||
data: {
|
||||
'oldTpin': oldTpin,
|
||||
'newTpin': newTpin,
|
||||
},
|
||||
);
|
||||
if (response.statusCode != 200) {
|
||||
throw Exception("Wrong OTP");
|
||||
}
|
||||
return response.toString();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user