dart format
This commit is contained in:
@@ -142,24 +142,22 @@ class AuthService {
|
||||
return;
|
||||
}
|
||||
|
||||
Future setTncflag() async{
|
||||
Future setTncflag() async {
|
||||
try {
|
||||
final response = await _dio.post(
|
||||
'/api/auth/tnc',
|
||||
data: {"flag": 'Y'},
|
||||
);
|
||||
if (response.statusCode != 200) {
|
||||
if (response.statusCode != 200) {
|
||||
throw AuthException('Failed to proceed with T&C');
|
||||
}
|
||||
}
|
||||
on DioException catch (e) {
|
||||
} on DioException catch (e) {
|
||||
if (kDebugMode) {
|
||||
print(e.toString());
|
||||
}
|
||||
throw NetworkException('Network error during T&C Setup');
|
||||
} catch (e) {
|
||||
throw UnexpectedException(
|
||||
'Unexpected error: ${e.toString()}');
|
||||
throw UnexpectedException('Unexpected error: ${e.toString()}');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,10 +39,10 @@ class LimitService {
|
||||
}
|
||||
}
|
||||
|
||||
void editLimit( double newLimit) async {
|
||||
void editLimit(double newLimit) async {
|
||||
try {
|
||||
final response = await _dio.post('/api/customer/daily-limit',
|
||||
data: '{"amount": $newLimit}');
|
||||
data: '{"amount": $newLimit}');
|
||||
if (response.statusCode == 200) {
|
||||
log('Response: ${response.data}');
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user