diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SendFeedbackHasAccountFlowTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SendFeedbackHasAccountFlowTest.kt index 9155c393f..15691fb94 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SendFeedbackHasAccountFlowTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/SendFeedbackHasAccountFlowTest.kt @@ -71,7 +71,7 @@ class SendFeedbackHasAccountFlowTest : BaseFeedbackFragmentTest() { override fun dispatch(request: RecordedRequest): MockResponse { val gson = ApiHelper.getInstance(getTargetContext()).gson - if (request.path?.startsWith("/backend/help/feedback") == true) { + if (request.path?.startsWith("/shared-tenant-fes/api/v1/account/feedback") == true) { return handlePostFeedbackRequest(gson) } diff --git a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseFeedbackFragmentTest.kt b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseFeedbackFragmentTest.kt index b6c8970f0..3675da48c 100644 --- a/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseFeedbackFragmentTest.kt +++ b/FlowCrypt/src/androidTest/java/com/flowcrypt/email/ui/base/BaseFeedbackFragmentTest.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.ui.base @@ -20,6 +20,6 @@ abstract class BaseFeedbackFragmentTest : BaseTest() { "SGQ4ADpmmXunpe7TYyMRB2t/IQapb3HLbfZlKDTWVqv95rL4VGJTtLltrSTuzpB7XGk13C8Dj8fNY77SrB+5bT" + "M0empyso5HTKLcdM8cHIu0Sz4yAgAVj29yuFbCq9x6S6oH7vkL1RIf/+CFeP17HNVfX5IMAAAAASUVORK5CYII=" - val SCREENSHOT_BYTE_ARRAY: ByteArray = Base64.decode(SCREENSHOT_BASE64, Base64.DEFAULT) + val SCREENSHOT_BYTE_ARRAY: ByteArray = Base64.decode(SCREENSHOT_BASE64, Base64.NO_WRAP) } } diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/RetrofitApiServiceInterface.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/RetrofitApiServiceInterface.kt index 371d48e06..713f1e90c 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/RetrofitApiServiceInterface.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/api/retrofit/RetrofitApiServiceInterface.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.api.retrofit @@ -53,15 +53,17 @@ interface RetrofitApiServiceInterface { ): Response /** - * This method create a [Call] object for the API "https://flowcrypt.com/api/help/feedback" + * This method create a [Call] object for the API "https://https://flowcrypt.com/shared-tenant-fes/api/v1/account/feedback" + * + * ref https://github.com/FlowCrypt/flowcrypt-android/pull/2171#discussion_r1084124018 + * ref https://github.com/FlowCrypt/flowcrypt-android/issues/2827 * * @param body POJO model for requests * @return [<] */ - //@POST(BuildConfig.SHARED_TENANT_FES_URL + "help/feedback") - //ref https://github.com/FlowCrypt/flowcrypt-android/pull/2171#discussion_r1084124018 - @POST(BuildConfig.BACKEND_URL + "help/feedback") - suspend fun backendPostHelpFeedback(@Body body: PostHelpFeedbackModel): Response + @POST(BuildConfig.SHARED_TENANT_FES_URL + "api/v1/account/feedback") + suspend fun backendPostHelpFeedback(@Body body: PostHelpFeedbackModel): + Response /** * This method create a [Call] object for the API "https://flowcrypt.com/attester/pub" diff --git a/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/SendFeedbackViewModel.kt b/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/SendFeedbackViewModel.kt index bd3b83cf3..e4d6abf21 100644 --- a/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/SendFeedbackViewModel.kt +++ b/FlowCrypt/src/main/java/com/flowcrypt/email/jetpack/viewmodel/SendFeedbackViewModel.kt @@ -1,6 +1,6 @@ /* * © 2016-present FlowCrypt a.s. Limitations apply. Contact human@flowcrypt.com - * Contributors: DenBond7 + * Contributors: denbond7 */ package com.flowcrypt.email.jetpack.viewmodel @@ -41,7 +41,7 @@ class SendFeedbackViewModel(application: Application) : BaseAndroidViewModel(app postFeedbackMutableStateFlow.value = Result.loading(progressMsg = context.getString(R.string.sending)) val screenShotBase64 = - Base64.encodeToString(screenshot?.byteArray ?: byteArrayOf(), Base64.DEFAULT) + Base64.encodeToString(screenshot?.byteArray ?: byteArrayOf(), Base64.NO_WRAP) try { postFeedbackMutableStateFlow.value = ApiClientRepository.Backend.postHelpFeedback(