package de.trainingstagebuch.app.services

import de.trainingstagebuch.app.repository.LogDetailResult
import de.trainingstagebuch.app.repository.LogsResult
import de.trainingstagebuch.app.repository.TrainingstagebuchRepository

class LogsService(
    private val repository: TrainingstagebuchRepository
) {
    suspend fun loadLogs(
        limit: Int,
        offset: Int,
        backend: String?,
        logType: String?,
        method: String?,
        statusCode: String?,
        path: String?,
        startDate: String?,
        endDate: String?
    ): LogsResult = repository.loadLogs(
        limit = limit,
        offset = offset,
        backend = backend,
        logType = logType,
        method = method,
        statusCode = statusCode,
        path = path,
        startDate = startDate,
        endDate = endDate
    )

    suspend fun loadLogDetail(id: String): LogDetailResult = repository.loadLogDetail(id)
}
