Skip to content

Commit

Permalink
#13 Minor cleanups in DatasetRecRunController
Browse files Browse the repository at this point in the history
  • Loading branch information
chadlwilson committed Nov 5, 2021
1 parent 914d686 commit 3320d99
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/kotlin/recce/server/api/DatasetRecRunController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ private val logger = KotlinLogging.logger {}
@Controller("/runs")
class DatasetRecRunController(
@Inject private val runner: DatasetRecRunner,
val runRepository: RecRunRepository
private val runRepository: RecRunRepository
) {
@Get(uri = "/{runId}")
fun get(runId: Int): Mono<CompletedRun> {
return runRepository.findById(runId).map { CompletedRun(it) }
}

@Get
fun get(@QueryValue datasetId: String): Flux<CompletedRun> {
fun get(@QueryValue("datasetId") datasetId: String): Flux<CompletedRun> {
return runRepository.findTop10ByDatasetIdOrderByCompletedTimeDesc(datasetId).map { CompletedRun(it) }
}

Expand Down

0 comments on commit 3320d99

Please sign in to comment.