Add change base url

This commit is contained in:
2026-02-16 15:14:10 +03:00
parent 43e7d02a61
commit 2837a63092

View File

@@ -11,14 +11,18 @@ import javax.inject.Singleton
@Module @Module
@InstallIn(SingletonComponent::class) @InstallIn(SingletonComponent::class)
object AppConfigModule { 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 @Provides
@Singleton @Singleton
fun provideAppConfig(): AppConfig = fun provideAppConfig(): AppConfig {
AppConfig( val baseUrl = if (BuildConfig.DEBUG) BASE_DEVELOP_URL else BASE_PROD_URL
return AppConfig(
isDebug = BuildConfig.DEBUG, isDebug = BuildConfig.DEBUG,
baseUrl = BASE_URL, baseUrl = baseUrl,
networkTimeoutSec = 30L networkTimeoutSec = 30L
) )
} }
}