forked from eatvio/eatvio_app
fix: glossary modeartion
This commit is contained in:
@@ -88,7 +88,7 @@ abstract class DiaryService {
|
||||
});
|
||||
|
||||
@POST('/api/diary/product_nutritional_values/sendToModeration')
|
||||
Future<GlossaryModerationModel> sendProductToModeration({
|
||||
Future<void> sendProductToModeration({
|
||||
@Body() required Map<String, dynamic> data,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -387,14 +387,14 @@ class _DiaryService implements DiaryService {
|
||||
}
|
||||
|
||||
@override
|
||||
Future<GlossaryModerationModel> sendProductToModeration(
|
||||
Future<void> sendProductToModeration(
|
||||
{required 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<GlossaryModerationModel>(Options(
|
||||
final _options = _setStreamType<void>(Options(
|
||||
method: 'POST',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
@@ -410,15 +410,7 @@ class _DiaryService implements DiaryService {
|
||||
_dio.options.baseUrl,
|
||||
baseUrl,
|
||||
)));
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late GlossaryModerationModel _value;
|
||||
try {
|
||||
_value = GlossaryModerationModel.fromJson(_result.data!);
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
await _dio.fetch<void>(_options);
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
|
||||
Reference in New Issue
Block a user