Skip to content

Commit

Permalink
make it so web view will automatically log in and use the correct end…
Browse files Browse the repository at this point in the history
…point for PPO cards (#2128)
  • Loading branch information
mtgriego authored Sep 11, 2024
1 parent 7fb3ddc commit 54d7405
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion app/src/main/graphql/fragments.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ fragment shippingRule on ShippingRule {

fragment ppoCard on Backing {
id
backingDetailsPageRoute(type: url)
backingDetailsPageRoute(type: url, tab: survey_responses)
clientSecret
amount {
...amount
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,11 @@ import android.net.Uri
import com.kickstarter.libs.Build
import com.kickstarter.libs.CurrentUserType
import com.kickstarter.libs.InternalToolsType
import com.kickstarter.libs.utils.Secrets
import com.kickstarter.libs.utils.WebUtils.userAgent
import com.kickstarter.libs.utils.extensions.isHivequeenUri
import com.kickstarter.libs.utils.extensions.isStagingUri
import com.kickstarter.libs.utils.extensions.isWebUri
import com.kickstarter.models.User
import okhttp3.Credentials
import okhttp3.Interceptor
import okhttp3.Interceptor.Chain
import okhttp3.Request
Expand Down Expand Up @@ -57,15 +55,15 @@ class WebRequestInterceptor(
requestBuilder.addHeader("Authorization", it)
}

if (isStaging(initialRequest)) {
requestBuilder.header(
name = "Authorization",
Credentials.basic(
Secrets.WebEndpoint.CredentialsStaging.USER,
Secrets.WebEndpoint.CredentialsStaging.PASS
)
)
}
// if (isStaging(initialRequest)) {
// requestBuilder.header(
// name = "Authorization",
// Credentials.basic(
// Secrets.WebEndpoint.CredentialsStaging.USER,
// Secrets.WebEndpoint.CredentialsStaging.PASS
// )
// )
// }

return requestBuilder.build()
}
Expand Down

0 comments on commit 54d7405

Please sign in to comment.