Skip to content

Commit

Permalink
Migrated to use 'shared-tenant-fes/api/v1/account/feedback'.| #2827
Browse files Browse the repository at this point in the history
  • Loading branch information
DenBond7 committed Dec 30, 2024
1 parent b121724 commit f2b4d67
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* © 2016-present FlowCrypt a.s. Limitations apply. Contact [email protected]
* Contributors: DenBond7
* Contributors: denbond7
*/

package com.flowcrypt.email.ui.base
Expand All @@ -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)
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* © 2016-present FlowCrypt a.s. Limitations apply. Contact [email protected]
* Contributors: DenBond7
* Contributors: denbond7
*/

package com.flowcrypt.email.api.retrofit
Expand Down Expand Up @@ -53,15 +53,17 @@ interface RetrofitApiServiceInterface {
): Response<WelcomeMessageResponse>

/**
* 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<PostHelpFeedbackResponse>
@POST(BuildConfig.SHARED_TENANT_FES_URL + "api/v1/account/feedback")
suspend fun backendPostHelpFeedback(@Body body: PostHelpFeedbackModel):
Response<PostHelpFeedbackResponse>

/**
* This method create a [Call] object for the API "https://flowcrypt.com/attester/pub"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* © 2016-present FlowCrypt a.s. Limitations apply. Contact [email protected]
* Contributors: DenBond7
* Contributors: denbond7
*/

package com.flowcrypt.email.jetpack.viewmodel
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit f2b4d67

Please sign in to comment.