-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FEATURE] #104 : 바텀 네비게이션 바텀 바 위로 올리기
- Loading branch information
Showing
6 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
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
10 changes: 9 additions & 1 deletion
10
core/domain/src/main/java/com/wap/wapp/core/domain/usecase/event/DeleteEventUseCase.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,19 @@ | ||
package com.wap.wapp.core.domain.usecase.event | ||
|
||
import com.wap.wapp.core.data.repository.event.EventRepository | ||
import com.wap.wapp.core.data.repository.survey.SurveyFormRepository | ||
import javax.inject.Inject | ||
|
||
class DeleteEventUseCase @Inject constructor( | ||
private val eventRepository: EventRepository, | ||
private val surveyFormRepository: SurveyFormRepository, | ||
) { | ||
suspend operator fun invoke(eventId: String): Result<Unit> = | ||
suspend operator fun invoke(eventId: String): Result<Unit> = runCatching { | ||
eventRepository.deleteEvent(eventId) | ||
surveyFormRepository.getSurveyFormList(eventId).mapCatching { surveyFormList -> | ||
surveyFormList.map { surveyForm -> | ||
surveyFormRepository.deleteSurveyForm(surveyForm.surveyFormId) | ||
} | ||
} | ||
} | ||
} |
3 changes: 1 addition & 2 deletions
3
core/domain/src/main/java/com/wap/wapp/core/domain/usecase/survey/DeleteSurveyUseCase.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,12 +1,11 @@ | ||
package com.wap.wapp.core.domain.usecase.survey | ||
|
||
import com.wap.wapp.core.data.repository.survey.SurveyRepository | ||
import com.wap.wapp.core.model.survey.Survey | ||
import javax.inject.Inject | ||
|
||
class DeleteSurveyUseCase @Inject constructor( | ||
private val surveyRepository: SurveyRepository, | ||
) { | ||
suspend operator fun invoke(surveyId: String): Result<Survey> = | ||
suspend operator fun invoke(surveyId: String): Result<Unit> = | ||
surveyRepository.deleteSurvey(surveyId) | ||
} |