fix(#201): fix platforms endpoint response shape mismatch
GET /api/messaging/platforms returns a JSON object with a platforms array inside, but the app expected a bare array. Wraps the response in a new MessagingPlatformResponse model. - Adds MessagingPlatformResponse.kt wrapper model - Updates HermesApiService.kt return type + adds profile query param - Updates ChannelsViewModel.kt to unwrap .platforms - Updates E2eIntegrationTest.kt mock to match new response shape
This commit is contained in:
1 parent
a89b932a0e
commit
35c608b2bf
4 files changed
+19
-4
No files matched your search
@@ -35,7 +35,7 @@ class ChannelsViewModel : ViewModel() {
|
||||
}
|
||||
when (result) {
|
||||
is NetworkResult.Success -> {
|
||||
_uiState.update { it.copy(isLoading = false, platforms = result.data.orEmpty()) }
|
||||
_uiState.update { it.copy(isLoading = false, platforms = result.data?.platforms.orEmpty()) }
|
||||
}
|
||||
|
||||
is NetworkResult.Failure -> {
|
||||
|
||||
Reference in new issue
Block a user