diff --git a/src/main/kotlin/de/fraunhofer/iem/dataprovider/repository/controller/RepositoryController.kt b/src/main/kotlin/de/fraunhofer/iem/dataprovider/repository/controller/RepositoryController.kt index 145b0ab026d514e9cc96d7f87c055e57ccd5edf0..42b68c67410b9c509bee2d593b895319241b80e2 100644 --- a/src/main/kotlin/de/fraunhofer/iem/dataprovider/repository/controller/RepositoryController.kt +++ b/src/main/kotlin/de/fraunhofer/iem/dataprovider/repository/controller/RepositoryController.kt @@ -24,8 +24,9 @@ class RepositoryController(private val toolRunService: ToolRunService) { } @GetMapping("/{id}") - suspend fun getRepositoryById(@PathVariable id: UUID): Repository { + suspend fun getRepositoryById(@PathVariable id: UUID): RepositoryDto { logger.info("Get repository with id $id") - return this.toolRunService.findRepoByID(id) ?: throw Exception("Repository can not be found") + val repositoryEntity = this.toolRunService.findRepoByID(id) ?: throw Exception("Repository can not be found") + return RepositoryDto(repositoryEntity.id!!, repositoryEntity.name!!) } } \ No newline at end of file