package ru.fincode.tsudesk.core.config.data.datasource

import ru.fincode.tsudesk.core.config.data.remote.api.ConfigApi
import ru.fincode.tsudesk.core.config.data.remote.dto.RemoteConfigDto
import ru.fincode.tsudesk.core.network.apiCall
import ru.fincode.tsudesk.core.network.model.NetworkResult
import javax.inject.Inject

class ConfigRemoteDataSourceImpl @Inject constructor(
    private val api: ConfigApi
) : ConfigRemoteDataSource {

    override suspend fun load(): NetworkResult<RemoteConfigDto> =
        apiCall { api.getConfig() }
}
