Change TPIn #3

This commit is contained in:
2025-11-08 16:56:54 +05:30
parent 87fd36b748
commit c26cc507a1
4 changed files with 178 additions and 25 deletions

View File

@@ -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();
}
}