Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#66 [feat] 유저별 데일리루틴 리스트 조회 api 연결 #69

Merged
merged 44 commits into from
Jan 17, 2024

Conversation

minemi00
Copy link
Member

@minemi00 minemi00 commented Jan 16, 2024

📑 Work Description

  • 유저별 데일리루틴 리스트 조회 api 연결했습니다
  • 달성, 삭제 완

🛠️ Issue

📷 Screenshot

Screen_recording_20240118_053912.mp4

💬 To Reviewers

@minemi00 minemi00 added Feat 새로운 기능 추가 민회🐹 민회가 작업함! labels Jan 16, 2024
@minemi00 minemi00 self-assigned this Jan 16, 2024
Copy link
Contributor

@stellar-halo stellar-halo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서버 처음이라 어려웠을텐데 고생했어요!

private val dailyRoutineDataSource: DailyRoutineDataSource
) : DailyRoutineRepository {
override suspend fun getDailyRoutine(): Result<List<DailyRoutine>> =
runCatching { dailyRoutineDataSource.getDailyRoutine() }.mapCatching { response ->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mapCatching을 쓰셨군요! 👍
https://medium.com/harrythegreat/kotlin-runcatching%EA%B3%BC-result-%ED%83%80%EC%9E%85-ab261f47efa8
map과 mapCatching의 차이입니다~ 혹시나 하여 남기고 가요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하 정독해보겠습니다!

Timber.d("뷰모델 서버 성공")
}
.onFailure { throwable ->
Timber.d("뷰모델 서버 실패")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

삭제 부탁드립니다~

…roid into feature/#66-daily-routine-user-api

# Conflicts:
#	app/src/main/java/com/sopetit/softie/data/repositoryImpl/DailyRoutineRepositoryImpl.kt
#	app/src/main/java/com/sopetit/softie/data/service/DailyRoutineService.kt
#	app/src/main/java/com/sopetit/softie/data/source/DailyRoutineDataSource.kt
#	app/src/main/java/com/sopetit/softie/di/RepositoryModule.kt
#	app/src/main/java/com/sopetit/softie/di/RetrofitServiceModule.kt
#	app/src/main/java/com/sopetit/softie/domain/repository/DailyRoutineRepository.kt
Copy link
Member

@emjayMJkim emjayMJkim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서버 통신 수고하셨습니당

import javax.inject.Inject

class DeleteDailyRoutineUseCase @Inject constructor(
private val deleteDailyRoutine: DailyRoutineRepository
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 변수 크게 상관은 없지만 dailyRoutineRespository 이런 식으로 repository를 받아온다는 걸 명확하게 하면 좀 더 좋을 것 같습니당

Comment on lines 99 to 107
private fun achieveRoutine() {
viewModel.isRoutineAchieveFirst.observe(viewLifecycleOwner) {
}
viewModel.isRoutineAchieveSecond.observe(viewLifecycleOwner) {
}
viewModel.isRoutineAchieveThird.observe(viewLifecycleOwner) {
}
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

이 부분 함수는 왜 만들어 두신 건가요...??

Copy link
Collaborator

@pump9918 pump9918 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서버와 연결되어 기쁩니다


override suspend fun postAddDailyRoutine(routineId: Int): Result<AddRoutine> =
runCatching {
dailyRoutineDataSource.postAddDailyRoutine(routineId)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it대신 response로 그 위치를 명시해주라는 리드님의 말씀을 잘 지켰네요!

Comment on lines +130 to +134
viewModel.isRoutineAchieveFirst.observe(viewLifecycleOwner) {
}
viewModel.isRoutineAchieveSecond.observe(viewLifecycleOwner) {
}
viewModel.isRoutineAchieveThird.observe(viewLifecycleOwner) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

요거는 왜 있나요~?

@minemi00 minemi00 merged commit 54b39e7 into develop Jan 17, 2024
1 check passed
@minemi00 minemi00 deleted the feature/#66-daily-routine-user-api branch January 17, 2024 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feat 새로운 기능 추가 민회🐹 민회가 작업함!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 유저별 데일리루틴 리스트 조회 api 연결
4 participants