-
Notifications
You must be signed in to change notification settings - Fork 0
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
Changes from all commits
Commits
Show all changes
44 commits
Select commit
Hold shift + click to select a range
2b1f79e
#66 [add] 유저별 데일리 루틴 리스폰스 추가
minemi00 56f1c2c
#66 [add] 유저별 데일리 루틴 리포지토리 추가
minemi00 a6f652c
#66 [add] 유저별 데일리 루틴 서비스 추가
minemi00 c1d208f
#66 [add] 유저별 데일리 루틴 데이터소스 추가
minemi00 6b060d5
#66 [add] 유저별 데일리 루틴 유스케이스 추가
minemi00 f344130
#66 [add] 유저별 데일리 루틴 의존성 주입
minemi00 c37c173
#66 [feat] 유저별 데일리 루틴 뷰모델 서버통신
minemi00 c72aff4
#66 [feat] 유저별 데일리 루틴 ui에 뷰모델 연결
minemi00 8010d8c
#66 [feat] 유저별 데일리 루틴 서버통신 성공
minemi00 c8b91da
#66 [chore] ci 오류 수정
minemi00 3f82e09
#66 [chore] 세번째 루틴 정렬 완
minemi00 2905657
Merge branch 'develop' of https://github.com/Team-Sopetit/Sopetit-And…
minemi00 f268ea2
Merge branch 'develop' of https://github.com/Team-Sopetit/Sopetit-And…
minemi00 78d256c
#66 [chore] 이미지 로드 수정
minemi00 e6a5ec6
Merge branch 'develop' of https://github.com/Team-Sopetit/Sopetit-And…
minemi00 21e37cd
#66 [add] 데일리루틴 달성 데이터클래스 생성
minemi00 eb9a3f3
#66 [add] 데일리루틴 달성 리스폰스 생성
minemi00 361998b
#66 [add] 데일리루틴 달성 리포지토리 생성
minemi00 83b836c
#66 [add] 데일리루틴 달성 데이터소스,서비스 생성
minemi00 efb7939
#66 [add] 데일리루틴 달성 유스케이스 생성
minemi00 a366dfa
#66 [add] 데일리루틴 달성 버튼 비활성화
minemi00 f2885c4
#66 [add] 데일리루틴 삭제 리포지토리 추가
minemi00 1758ffa
#66 [add] 데일리루틴 삭제 데이터소스 추가
minemi00 d7840a5
#66 [add] 데일리루틴 삭제 서비스 추가
minemi00 a721cd7
#66 [add] 데일리루틴 주석 제거 및 timber 제거
minemi00 675821c
#66 [add] 데일리루틴 삭제 유스케이스 추가
minemi00 ecf9ce2
#66 [add] 데일리루틴 글자 행간 수정
minemi00 366b151
Merge branch 'develop' of https://github.com/Team-Sopetit/Sopetit-And…
minemi00 f2e2849
#66 [chore] 충돌 해결
minemi00 7121ee6
#66 [chore] 삭제 서버 로직 변경
minemi00 1f29c4b
#66 [add] 데일리루틴 달성 데이터 클래스 추가
minemi00 6cccba1
#66 [add] 데일리루틴 달성 리스폰스,리퀘스트 추가
minemi00 18fa251
#66 [add] 데일리루틴 달성 리포지토리 추가
minemi00 2e8cbe9
#66 [add] 데일리루틴 달성 데이터소스, 서비스 추가
minemi00 c4e2e4b
#66 [add] 데일리루틴 달성 유스케이스 추가
minemi00 0849b79
#66 [add] 데일리 루틴 문장수에 따른 반응형으로 만들기
minemi00 55fac11
#66 [add] 유저 데일리 루틴 데이터 클래스 생성
minemi00 409ada6
#66 [chore] 네이밍 수정
minemi00 e3bbb06
Merge branch 'develop' of https://github.com/Team-Sopetit/Sopetit-And…
minemi00 d3e3370
Merge branch 'develop' of https://github.com/Team-Sopetit/Sopetit-And…
minemi00 0df6381
#66 [chore] 데일리 루틴 삭제 로직 수정, 루틴id에서 루틴 list로 수정 및 삭제시 리스트 get해서 업데이트 추가
minemi00 9154bdd
Merge branch 'develop' of https://github.com/Team-Sopetit/Sopetit-And…
minemi00 ccc3858
#66 [chore] 데일리 루틴 삭제 서버 연결 성공
minemi00 77a8fe5
#66 [chore] ci 해결
minemi00 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/sopetit/softie/data/entity/request/AddDailyRoutineRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.sopetit.softie.data.entity.request | ||
|
||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class AddDailyRoutineRequest( | ||
@SerialName("routineId") | ||
val routineId: Int | ||
) |
21 changes: 21 additions & 0 deletions
21
app/src/main/java/com/sopetit/softie/data/entity/response/AchieveDailyResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package com.sopetit.softie.data.entity.response | ||
|
||
import com.sopetit.softie.domain.entity.DailyAchieve | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class AchieveDailyResponse( | ||
@SerialName("routineId") | ||
val routineId: Int, | ||
@SerialName("isAchieve") | ||
val isAchieve: Boolean, | ||
@SerialName("achieveCount") | ||
val achieveCount: Int | ||
) { | ||
fun toAchieveDaily(): DailyAchieve = DailyAchieve( | ||
routineId = this.routineId, | ||
isAchieve = this.isAchieve, | ||
achieveCount = this.achieveCount | ||
) | ||
} |
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/sopetit/softie/data/entity/response/AddDailyRoutineResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.sopetit.softie.data.entity.response | ||
|
||
import com.sopetit.softie.domain.entity.AddRoutine | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class AddDailyRoutineResponse( | ||
@SerialName("routineId") | ||
val routineId: Int | ||
) { | ||
fun toAddDailyRoutine(): AddRoutine = AddRoutine( | ||
routineId = this.routineId | ||
) | ||
} |
25 changes: 25 additions & 0 deletions
25
app/src/main/java/com/sopetit/softie/data/entity/response/DailyCardResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package com.sopetit.softie.data.entity.response | ||
|
||
import com.sopetit.softie.domain.entity.Routine | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
data class DailyCardResponse( | ||
@SerialName("routines") | ||
val routines: List<RoutineItem> | ||
) { | ||
@Serializable | ||
data class RoutineItem( | ||
@SerialName("routineId") | ||
val routineId: Int, | ||
@SerialName("content") | ||
val content: String | ||
) | ||
|
||
fun toRoutine() = routines.map { | ||
Routine( | ||
routineId = it.routineId, | ||
content = it.content | ||
) | ||
} | ||
} |
35 changes: 35 additions & 0 deletions
35
app/src/main/java/com/sopetit/softie/data/entity/response/DailyRoutineResponse.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
package com.sopetit.softie.data.entity.response | ||
|
||
import com.sopetit.softie.domain.entity.DailyRoutine | ||
import kotlinx.serialization.SerialName | ||
import kotlinx.serialization.Serializable | ||
|
||
@Serializable | ||
data class DailyRoutineResponse( | ||
@SerialName("routines") | ||
val routines: List<DailyRoutineItem> | ||
) { | ||
@Serializable | ||
data class DailyRoutineItem( | ||
@SerialName("routineId") | ||
val routineId: Int, | ||
@SerialName("content") | ||
val content: String, | ||
@SerialName("iconImageUrl") | ||
val iconImageUrl: String, | ||
@SerialName("achieveCount") | ||
val achieveCount: Int, | ||
@SerialName("isAchieve") | ||
val isAchieve: Boolean | ||
) | ||
|
||
fun toUserDailyRoutine() = routines.map { | ||
DailyRoutine( | ||
routineId = it.routineId, | ||
content = it.content, | ||
iconImageUrl = it.iconImageUrl, | ||
achieveCount = it.achieveCount, | ||
isAchieve = it.isAchieve | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,9 @@ | ||
package com.sopetit.softie.data.repositoryImpl | ||
|
||
import com.sopetit.softie.data.source.DailyRoutineDataSource | ||
import com.sopetit.softie.domain.entity.AddRoutine | ||
import com.sopetit.softie.domain.entity.DailyAchieve | ||
import com.sopetit.softie.domain.entity.DailyRoutine | ||
import com.sopetit.softie.domain.entity.Routine | ||
import com.sopetit.softie.domain.entity.Theme | ||
import com.sopetit.softie.domain.repository.DailyRoutineRepository | ||
|
@@ -9,6 +12,18 @@ import javax.inject.Inject | |
class DailyRoutineRepositoryImpl @Inject constructor( | ||
private val dailyRoutineDataSource: DailyRoutineDataSource | ||
) : DailyRoutineRepository { | ||
override suspend fun getDailyRoutine(): Result<List<DailyRoutine>> = | ||
runCatching { dailyRoutineDataSource.getDailyRoutine() }.mapCatching { response -> | ||
requireNotNull(response.data).toUserDailyRoutine() | ||
} | ||
|
||
override suspend fun patchAchieveDaily(routineId: Int): Result<DailyAchieve> = | ||
runCatching { dailyRoutineDataSource.patchAchieveDaily(routineId) }.map { response -> | ||
requireNotNull(response.data).toAchieveDaily() | ||
} | ||
|
||
override suspend fun deleteDailyRoutine(routineIdList: List<Int>): Result<Unit> = | ||
runCatching { dailyRoutineDataSource.deleteDailyRoutine(routineIdList) } | ||
|
||
override suspend fun getTheme(): Result<List<Theme>> = runCatching { | ||
dailyRoutineDataSource.getTheme() | ||
|
@@ -21,4 +36,11 @@ class DailyRoutineRepositoryImpl @Inject constructor( | |
}.mapCatching { dailyRoutineList -> | ||
requireNotNull(dailyRoutineList.data).toRoutine() | ||
} | ||
|
||
override suspend fun postAddDailyRoutine(routineId: Int): Result<AddRoutine> = | ||
runCatching { | ||
dailyRoutineDataSource.postAddDailyRoutine(routineId) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it대신 response로 그 위치를 명시해주라는 리드님의 말씀을 잘 지켰네요! |
||
}.map { response -> | ||
requireNotNull(response.data).toAddDailyRoutine() | ||
} | ||
} |
25 changes: 24 additions & 1 deletion
25
app/src/main/java/com/sopetit/softie/data/service/DailyRoutineService.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,41 @@ | ||
package com.sopetit.softie.data.service | ||
|
||
import com.sopetit.softie.data.entity.BaseResponse | ||
import com.sopetit.softie.data.entity.response.AchieveDailyResponse | ||
import com.sopetit.softie.data.entity.response.AddDailyRoutineResponse | ||
import com.sopetit.softie.data.entity.response.DailyCardResponse | ||
import com.sopetit.softie.data.entity.response.DailyRoutineListResponse | ||
import com.sopetit.softie.data.entity.response.DailyRoutineResponse | ||
import com.sopetit.softie.data.entity.response.ThemeListResponse | ||
import retrofit2.http.Body | ||
import retrofit2.http.DELETE | ||
import retrofit2.http.GET | ||
import retrofit2.http.PATCH | ||
import retrofit2.http.POST | ||
import retrofit2.http.Path | ||
import retrofit2.http.Query | ||
|
||
interface DailyRoutineService { | ||
|
||
@GET("api/v1/routines/daily/themes") | ||
suspend fun getTheme(): BaseResponse<ThemeListResponse> | ||
|
||
@GET("api/v1/routines/daily") | ||
suspend fun getRoutineList( | ||
@Query("themes") themes: List<Int> | ||
): BaseResponse<DailyRoutineListResponse> | ||
|
||
@GET("api/v1/routines/daily/member") | ||
suspend fun getDailyRoutine(): BaseResponse<DailyRoutineResponse> | ||
|
||
@PATCH("api/v1/routines/daily/member/routine/{routineId}") | ||
suspend fun patchAchieveDaily(@Path("routineId") routineId: Int): BaseResponse<AchieveDailyResponse> | ||
|
||
@DELETE("api/v1/routines/daily/member") | ||
suspend fun deleteDailyRoutine(@Query("routines") routineIdList: List<Int>): BaseResponse<Unit> | ||
|
||
@POST("api/v1/routines/daily/member") | ||
suspend fun postAddDailyRoutine(@Body routineId: Int): BaseResponse<AddDailyRoutineResponse> | ||
|
||
@GET("api/v1/routines/daily/theme/{themeId}") | ||
suspend fun getDailyCardList(@Path("themeId") themeId: Int): BaseResponse<DailyCardResponse> | ||
} |
15 changes: 15 additions & 0 deletions
15
app/src/main/java/com/sopetit/softie/data/source/DailyRoutineDataSource.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,31 @@ | ||
package com.sopetit.softie.data.source | ||
|
||
import com.sopetit.softie.data.entity.BaseResponse | ||
import com.sopetit.softie.data.entity.response.AchieveDailyResponse | ||
import com.sopetit.softie.data.entity.response.AddDailyRoutineResponse | ||
import com.sopetit.softie.data.entity.response.DailyRoutineListResponse | ||
import com.sopetit.softie.data.entity.response.DailyRoutineResponse | ||
import com.sopetit.softie.data.entity.response.ThemeListResponse | ||
import com.sopetit.softie.data.service.DailyRoutineService | ||
import javax.inject.Inject | ||
|
||
class DailyRoutineDataSource @Inject constructor( | ||
private val dailyRoutineService: DailyRoutineService | ||
) { | ||
suspend fun getDailyRoutine(): BaseResponse<DailyRoutineResponse> = | ||
dailyRoutineService.getDailyRoutine() | ||
|
||
suspend fun patchAchieveDaily(routineId: Int): BaseResponse<AchieveDailyResponse> = | ||
dailyRoutineService.patchAchieveDaily(routineId) | ||
|
||
suspend fun deleteDailyRoutine(routineIdList: List<Int>): BaseResponse<Unit> = | ||
dailyRoutineService.deleteDailyRoutine(routineIdList) | ||
|
||
suspend fun getTheme(): BaseResponse<ThemeListResponse> = dailyRoutineService.getTheme() | ||
|
||
suspend fun getRoutineList(themeId: List<Int>): BaseResponse<DailyRoutineListResponse> = | ||
dailyRoutineService.getRoutineList(themeId) | ||
|
||
suspend fun postAddDailyRoutine(routineId: Int): BaseResponse<AddDailyRoutineResponse> = | ||
dailyRoutineService.postAddDailyRoutine(routineId) | ||
} |
5 changes: 5 additions & 0 deletions
5
app/src/main/java/com/sopetit/softie/domain/entity/AddRoutine.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.sopetit.softie.domain.entity | ||
|
||
data class AddRoutine( | ||
val routineId: Int | ||
) |
7 changes: 7 additions & 0 deletions
7
app/src/main/java/com/sopetit/softie/domain/entity/DailyAchieve.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.sopetit.softie.domain.entity | ||
|
||
data class DailyAchieve( | ||
val routineId: Int, | ||
val isAchieve: Boolean, | ||
val achieveCount: Int | ||
) |
8 changes: 8 additions & 0 deletions
8
app/src/main/java/com/sopetit/softie/domain/entity/UserDailyRoutine.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package com.sopetit.softie.domain.entity | ||
|
||
data class UserDailyRoutine( | ||
val routineId: Int, | ||
val iconImageUrl: String, | ||
val content: String, | ||
val backgroundImageUrl: String | ||
) |
9 changes: 8 additions & 1 deletion
9
app/src/main/java/com/sopetit/softie/domain/repository/DailyRoutineRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,18 @@ | ||
package com.sopetit.softie.domain.repository | ||
|
||
import com.sopetit.softie.domain.entity.AddRoutine | ||
import com.sopetit.softie.domain.entity.DailyAchieve | ||
import com.sopetit.softie.domain.entity.DailyRoutine | ||
import com.sopetit.softie.domain.entity.Routine | ||
import com.sopetit.softie.domain.entity.Theme | ||
|
||
interface DailyRoutineRepository { | ||
|
||
suspend fun getDailyRoutine(): Result<List<DailyRoutine>> | ||
suspend fun patchAchieveDaily(routineId: Int): Result<DailyAchieve> | ||
suspend fun deleteDailyRoutine(routineIdList: List<Int>): Result<Unit> | ||
suspend fun getTheme(): Result<List<Theme>> | ||
|
||
suspend fun getRoutineList(themeId: List<Int>): Result<List<Routine>> | ||
|
||
suspend fun postAddDailyRoutine(routineId: Int): Result<AddRoutine> | ||
} |
11 changes: 11 additions & 0 deletions
11
app/src/main/java/com/sopetit/softie/domain/usecase/DeleteDailyRoutineUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.sopetit.softie.domain.usecase | ||
|
||
import com.sopetit.softie.domain.repository.DailyRoutineRepository | ||
import javax.inject.Inject | ||
|
||
class DeleteDailyRoutineUseCase @Inject constructor( | ||
private val deleteDailyRoutine: DailyRoutineRepository | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 이 부분 변수 크게 상관은 없지만 dailyRoutineRespository 이런 식으로 repository를 받아온다는 걸 명확하게 하면 좀 더 좋을 것 같습니당 |
||
) { | ||
suspend operator fun invoke(routineIdList: List<Int>) = | ||
deleteDailyRoutine.deleteDailyRoutine(routineIdList) | ||
} |
10 changes: 10 additions & 0 deletions
10
app/src/main/java/com/sopetit/softie/domain/usecase/GetDailyRoutineUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
package com.sopetit.softie.domain.usecase | ||
|
||
import com.sopetit.softie.domain.repository.DailyRoutineRepository | ||
import javax.inject.Inject | ||
|
||
class GetDailyRoutineUseCase @Inject constructor( | ||
private val dailyRoutineRepository: DailyRoutineRepository | ||
) { | ||
suspend operator fun invoke() = dailyRoutineRepository.getDailyRoutine() | ||
} |
11 changes: 11 additions & 0 deletions
11
app/src/main/java/com/sopetit/softie/domain/usecase/PatchAchieveDailyUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.sopetit.softie.domain.usecase | ||
|
||
import com.sopetit.softie.domain.repository.DailyRoutineRepository | ||
import javax.inject.Inject | ||
|
||
class PatchAchieveDailyUseCase @Inject constructor( | ||
private val achieveDailyRepository: DailyRoutineRepository | ||
) { | ||
suspend operator fun invoke(routineId: Int) = | ||
achieveDailyRepository.patchAchieveDaily(routineId) | ||
} |
11 changes: 11 additions & 0 deletions
11
app/src/main/java/com/sopetit/softie/domain/usecase/PostAddDailyRoutineUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package com.sopetit.softie.domain.usecase | ||
|
||
import com.sopetit.softie.domain.repository.DailyRoutineRepository | ||
import javax.inject.Inject | ||
|
||
class PostAddDailyRoutineUseCase @Inject constructor( | ||
private val dailyRoutineRepository: DailyRoutineRepository | ||
) { | ||
suspend operator fun invoke(routineId: Int) = | ||
dailyRoutineRepository.postAddDailyRoutine(routineId) | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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의 차이입니다~ 혹시나 하여 남기고 가요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
아하 정독해보겠습니다!