번호 자동 부여 대응 및 API 공통 처리 보강
This commit is contained in:
@@ -56,8 +56,7 @@ class GroupRepositoryRemote implements GroupRepository {
|
||||
data: input.toPayload(),
|
||||
options: Options(responseType: ResponseType.json),
|
||||
);
|
||||
final data = (response.data?['data'] as Map<String, dynamic>?) ?? {};
|
||||
return GroupDto.fromJson(data).toEntity();
|
||||
return GroupDto.fromJson(_api.unwrapAsMap(response)).toEntity();
|
||||
}
|
||||
|
||||
/// 그룹 정보를 수정한다.
|
||||
@@ -69,8 +68,7 @@ class GroupRepositoryRemote implements GroupRepository {
|
||||
data: payload,
|
||||
options: Options(responseType: ResponseType.json),
|
||||
);
|
||||
final data = (response.data?['data'] as Map<String, dynamic>?) ?? {};
|
||||
return GroupDto.fromJson(data).toEntity();
|
||||
return GroupDto.fromJson(_api.unwrapAsMap(response)).toEntity();
|
||||
}
|
||||
|
||||
/// 그룹을 삭제한다.
|
||||
@@ -86,7 +84,6 @@ class GroupRepositoryRemote implements GroupRepository {
|
||||
'$_basePath/$id/restore',
|
||||
options: Options(responseType: ResponseType.json),
|
||||
);
|
||||
final data = (response.data?['data'] as Map<String, dynamic>?) ?? {};
|
||||
return GroupDto.fromJson(data).toEntity();
|
||||
return GroupDto.fromJson(_api.unwrapAsMap(response)).toEntity();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user