Skip to content

Commit

Permalink
[ADD/#109] 계좌 조회 API data, domain 모듈 설정
Browse files Browse the repository at this point in the history
  • Loading branch information
Marchbreeze committed Sep 3, 2024
1 parent d5ab6e0 commit 78e33cb
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ interface SettingDataSource {
accountId: Long,
request: BankRequestDto,
): BaseResponse<BankDto>

suspend fun getUserBank(): BaseResponse<BankDto>
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,6 @@ data class SettingDataSourceImpl
accountId: Long,
request: BankRequestDto,
): BaseResponse<BankDto> = settingService.putToModBank(accountId, request)

override suspend fun getUserBank(): BaseResponse<BankDto> = settingService.getUserBank()
}
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,9 @@ class SettingRepositoryImpl
runCatching {
settingDataSource.putToModBank(accountId, request.toDto()).data.toModel()
}

override suspend fun getUserBank(): Result<BankModel> =
runCatching {
settingDataSource.getUserBank().data.toModel()
}
}
3 changes: 3 additions & 0 deletions data/src/main/java/co/orange/data/service/SettingService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,7 @@ interface SettingService {
@Path("id") accountId: Long,
@Body request: BankRequestDto,
): BaseResponse<BankDto>

@GET("/api/v1/mypage/setting/account")
suspend fun getUserBank(): BaseResponse<BankDto>
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,6 @@ interface SettingRepository {
accountId: Long,
request: BankRequestModel,
): Result<BankModel>

suspend fun getUserBank(): Result<BankModel>
}

0 comments on commit 78e33cb

Please sign in to comment.