|
|
|
@ -1340,6 +1340,40 @@ class _UserApi implements UserApi { |
|
|
|
return httpResponse; |
|
|
|
} |
|
|
|
|
|
|
|
@override |
|
|
|
Future<HttpResponse<BaseResponse<dynamic>>> applyMatchmaker( |
|
|
|
Map<String, dynamic> data, |
|
|
|
) async { |
|
|
|
final _extra = <String, dynamic>{}; |
|
|
|
final queryParameters = <String, dynamic>{}; |
|
|
|
final _headers = <String, dynamic>{}; |
|
|
|
final _data = <String, dynamic>{}; |
|
|
|
_data.addAll(data); |
|
|
|
final _options = _setStreamType<HttpResponse<BaseResponse<dynamic>>>( |
|
|
|
Options(method: 'POST', headers: _headers, extra: _extra) |
|
|
|
.compose( |
|
|
|
_dio.options, |
|
|
|
'dating-agency-uec/user/apply/matchmaker', |
|
|
|
queryParameters: queryParameters, |
|
|
|
data: _data, |
|
|
|
) |
|
|
|
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)), |
|
|
|
); |
|
|
|
final _result = await _dio.fetch<Map<String, dynamic>>(_options); |
|
|
|
late BaseResponse<dynamic> _value; |
|
|
|
try { |
|
|
|
_value = BaseResponse<dynamic>.fromJson( |
|
|
|
_result.data!, |
|
|
|
(json) => json as dynamic, |
|
|
|
); |
|
|
|
} on Object catch (e, s) { |
|
|
|
errorLogger?.logError(e, s, _options); |
|
|
|
rethrow; |
|
|
|
} |
|
|
|
final httpResponse = HttpResponse(_value, _result); |
|
|
|
return httpResponse; |
|
|
|
} |
|
|
|
|
|
|
|
RequestOptions _setStreamType<T>(RequestOptions requestOptions) { |
|
|
|
if (T != dynamic && |
|
|
|
!(requestOptions.responseType == ResponseType.bytes || |
|
|
|
|