verifyEmail method

Future<Map<String, dynamic>> verifyEmail({
  1. required String token,
})

Verify email with token

Implementation

Future<Map<String, dynamic>> verifyEmail({
  required String token,
}) async {
  try {
    print('✅ AuthService.verifyEmail called');

    final response = await _apiClient.post<Map<String, dynamic>>(
      '/api/v1/auth/verify-email',
      data: {
        'token': token,
      },
    );

    print('✅ AuthService.verifyEmail response received');
    return response;
  } on ProdobitException {
    rethrow;
  } catch (e) {
    print('❌ AuthService.verifyEmail error: $e');
    throw AuthException(
      'Failed to verify email: $e',
      code: 'VERIFY_EMAIL_ERROR',
    );
  }
}