Add change base url
This commit is contained in:
@@ -11,14 +11,18 @@ import javax.inject.Singleton
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
object AppConfigModule {
|
||||
const val BASE_URL = "https://tulsu.ru/schedule/queries/"
|
||||
|
||||
private const val BASE_PROD_URL = "https://tulsu.ru/schedule/queries/"
|
||||
private const val BASE_DEVELOP_URL = "https://tulsu.ru/schedule/queries/"
|
||||
|
||||
@Provides
|
||||
@Singleton
|
||||
fun provideAppConfig(): AppConfig =
|
||||
AppConfig(
|
||||
fun provideAppConfig(): AppConfig {
|
||||
val baseUrl = if (BuildConfig.DEBUG) BASE_DEVELOP_URL else BASE_PROD_URL
|
||||
return AppConfig(
|
||||
isDebug = BuildConfig.DEBUG,
|
||||
baseUrl = BASE_URL,
|
||||
baseUrl = baseUrl,
|
||||
networkTimeoutSec = 30L
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user