주석화 진행상황 정리하고 핵심 모듈에 한글 주석 추가
This commit is contained in:
@@ -6,6 +6,7 @@ import '../../domain/entities/group.dart';
|
||||
import '../../domain/repositories/group_repository.dart';
|
||||
import '../dtos/group_dto.dart';
|
||||
|
||||
/// 권한 그룹 API를 호출하는 원격 저장소 구현체.
|
||||
class GroupRepositoryRemote implements GroupRepository {
|
||||
GroupRepositoryRemote({required ApiClient apiClient}) : _api = apiClient;
|
||||
|
||||
@@ -13,6 +14,7 @@ class GroupRepositoryRemote implements GroupRepository {
|
||||
|
||||
static const _basePath = '/groups';
|
||||
|
||||
/// 그룹 목록을 조회한다.
|
||||
@override
|
||||
Future<PaginatedResult<Group>> list({
|
||||
int page = 1,
|
||||
@@ -35,6 +37,7 @@ class GroupRepositoryRemote implements GroupRepository {
|
||||
return GroupDto.parsePaginated(response.data ?? const {});
|
||||
}
|
||||
|
||||
/// 새 그룹을 생성한다.
|
||||
@override
|
||||
Future<Group> create(GroupInput input) async {
|
||||
final response = await _api.post<Map<String, dynamic>>(
|
||||
@@ -46,6 +49,7 @@ class GroupRepositoryRemote implements GroupRepository {
|
||||
return GroupDto.fromJson(data).toEntity();
|
||||
}
|
||||
|
||||
/// 그룹 정보를 수정한다.
|
||||
@override
|
||||
Future<Group> update(int id, GroupInput input) async {
|
||||
final response = await _api.patch<Map<String, dynamic>>(
|
||||
@@ -57,11 +61,13 @@ class GroupRepositoryRemote implements GroupRepository {
|
||||
return GroupDto.fromJson(data).toEntity();
|
||||
}
|
||||
|
||||
/// 그룹을 삭제한다.
|
||||
@override
|
||||
Future<void> delete(int id) async {
|
||||
await _api.delete<void>('$_basePath/$id');
|
||||
}
|
||||
|
||||
/// 삭제된 그룹을 복구한다.
|
||||
@override
|
||||
Future<Group> restore(int id) async {
|
||||
final response = await _api.post<Map<String, dynamic>>(
|
||||
|
||||
Reference in New Issue
Block a user