Update README.adoc
Update readme to match the code
This commit is contained in:
committed by
Sébastien Deleuze
parent
9a4d7411c9
commit
dd122f3b90
@@ -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")
|
||||
}
|
||||
----
|
||||
|
||||
|
||||
Reference in New Issue
Block a user