-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Uploads QuestionnaireResponse as a searchable map to Firestore (#99)
- Loading branch information
1 parent
5303623
commit 997eb67
Showing
7 changed files
with
30 additions
and
30 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
10 changes: 0 additions & 10 deletions
10
app/src/main/java/edu/stanford/cardinalkit/domain/models/SurveyResult.kt
This file was deleted.
Oops, something went wrong.
3 changes: 1 addition & 2 deletions
3
app/src/main/java/edu/stanford/cardinalkit/domain/repositories/SurveyRepository.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,10 +1,9 @@ | ||
package edu.stanford.cardinalkit.domain.repositories | ||
|
||
import edu.stanford.cardinalkit.domain.models.Response | ||
import edu.stanford.cardinalkit.domain.models.SurveyResult | ||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface SurveyRepository { | ||
suspend fun getSurvey(name: String): Flow<Response<String?>> | ||
suspend fun uploadSurveyResult(result: SurveyResult): Flow<Response<Void?>> | ||
suspend fun uploadSurveyResult(result: Map<String, Any>): Flow<Response<Void?>> | ||
} |
3 changes: 1 addition & 2 deletions
3
app/src/main/java/edu/stanford/cardinalkit/domain/usecases/surveys/UploadSurveyResult.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 edu.stanford.cardinalkit.domain.usecases.surveys | ||
|
||
import edu.stanford.cardinalkit.domain.models.SurveyResult | ||
import edu.stanford.cardinalkit.domain.repositories.SurveyRepository | ||
|
||
class UploadSurveyResult( | ||
private val repository: SurveyRepository | ||
) { | ||
suspend operator fun invoke( | ||
result: SurveyResult | ||
result: Map<String, Any> | ||
) = repository.uploadSurveyResult(result) | ||
} |
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