번호 자동 부여 대응 및 API 공통 처리 보강
This commit is contained in:
@@ -46,8 +46,7 @@ class WarehouseRepositoryRemote implements WarehouseRepository {
|
||||
data: warehouseInputToJson(input),
|
||||
options: Options(responseType: ResponseType.json),
|
||||
);
|
||||
final data = (response.data?['data'] as Map<String, dynamic>?) ?? {};
|
||||
return WarehouseDto.fromJson(data).toEntity();
|
||||
return WarehouseDto.fromJson(_api.unwrapAsMap(response)).toEntity();
|
||||
}
|
||||
|
||||
/// 창고 정보를 수정한다.
|
||||
@@ -59,8 +58,7 @@ class WarehouseRepositoryRemote implements WarehouseRepository {
|
||||
data: payload,
|
||||
options: Options(responseType: ResponseType.json),
|
||||
);
|
||||
final data = (response.data?['data'] as Map<String, dynamic>?) ?? {};
|
||||
return WarehouseDto.fromJson(data).toEntity();
|
||||
return WarehouseDto.fromJson(_api.unwrapAsMap(response)).toEntity();
|
||||
}
|
||||
|
||||
/// 창고를 삭제한다.
|
||||
@@ -76,7 +74,6 @@ class WarehouseRepositoryRemote implements WarehouseRepository {
|
||||
'$_basePath/$id/restore',
|
||||
options: Options(responseType: ResponseType.json),
|
||||
);
|
||||
final data = (response.data?['data'] as Map<String, dynamic>?) ?? {};
|
||||
return WarehouseDto.fromJson(data).toEntity();
|
||||
return WarehouseDto.fromJson(_api.unwrapAsMap(response)).toEntity();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user