From dd122f3b9040b2214a16631f73891c11a6b29ec5 Mon Sep 17 00:00:00 2001 From: Dusan Odalovic Date: Sun, 20 Sep 2020 20:23:58 +0200 Subject: [PATCH] Update README.adoc Update readme to match the code --- README.adoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.adoc b/README.adoc index c65189b..aee5488 100644 --- a/README.adoc +++ b/README.adoc @@ -767,7 +767,7 @@ class ArticleController(private val repository: ArticleRepository) { @GetMapping("/{slug}") fun findOne(@PathVariable slug: String) = - repository.findBySlug(slug) ?: ResponseStatusException(HttpStatus.NOT_FOUND, "This article does not exist") + repository.findBySlug(slug) ?: throw ResponseStatusException(HttpStatus.NOT_FOUND, "This article does not exist") } @@ -780,7 +780,7 @@ class UserController(private val repository: UserRepository) { @GetMapping("/{login}") fun findOne(@PathVariable login: String) = - repository.findByLogin(login) ?: ResponseStatusException(HttpStatus.NOT_FOUND, "This user does not exist") + repository.findByLogin(login) ?: throw ResponseStatusException(HttpStatus.NOT_FOUND, "This user does not exist") } ----