Fixed an error during Login

This commit is contained in:
Aditya Gupta 2023-02-02 19:38:06 +05:30
parent 2884de1e65
commit 98ca7af592
6 changed files with 10 additions and 7 deletions

View File

@ -7,7 +7,7 @@ package org.mifos.mobile.api
class BaseURL {
val url: String? = null
get() = field
?: PROTOCOL_HTTPS + API_ENDPOINT + API_PATH
?: (PROTOCOL_HTTPS + API_ENDPOINT + API_PATH)
val defaultBaseUrl: String
get() = PROTOCOL_HTTPS + API_ENDPOINT
@ -17,7 +17,7 @@ class BaseURL {
companion object {
const val API_ENDPOINT = "demo.mifos.community"
const val API_PATH = "/fineract-provider/api/v1/self/"
const val API_PATH = "/fineract-provider/api/v1/"
const val PROTOCOL_HTTPS = "https://"
}
}

View File

@ -5,6 +5,7 @@
package org.mifos.mobile.api
import android.text.TextUtils
import android.util.Log
import okhttp3.Interceptor
import okhttp3.Response
@ -22,6 +23,7 @@ class SelfServiceInterceptor(private val tenant: String?, private val authToken:
val chainRequest = chain.request()
val builder = chainRequest.newBuilder()
.header(HEADER_TENANT, tenant)
.header(CONTENT_TYPE,"application/json")
if (!TextUtils.isEmpty(authToken)) {
builder.header(HEADER_AUTH, authToken)
}
@ -32,6 +34,7 @@ class SelfServiceInterceptor(private val tenant: String?, private val authToken:
companion object {
const val HEADER_TENANT = "Fineract-Platform-TenantId"
const val HEADER_AUTH = "Authorization"
const val DEFAULT_TENANT = "mobile"
const val DEFAULT_TENANT = "default"
const val CONTENT_TYPE = "Content-Type"
}
}

View File

@ -19,7 +19,7 @@ class BaseURL {
companion object {
const val API_ENDPOINT = "demo.mifos.community"
const val API_PATH = "/fineract-provider/api/v1/self/"
const val API_PATH = "/fineract-provider/api/v1/"
const val PROTOCOL_HTTPS = "https://"
}
}

View File

@ -59,7 +59,7 @@ ext {
retrofitVersion = '2.2.0'
okHttp3Version = '3.6.0'
butterKnifeVersion = '8.0.1'
dbflowVersion = '4.1.2'
dbflowVersion = '4.2.4'
playServicesVersion = '17.0.0'
firebaseMessagingVersion = '21.0.1'
oss_licenses = '17.0.0'

View File

@ -16,7 +16,7 @@
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
org.gradle.jvmargs=-XX:MaxPermSize=2048m -XX:+CMSClassUnloadingEnabled -XX:+HeapDumpOnOutOfMemoryError -Xmx2048m
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6-bin.zip