Skip to content

Instantly share code, notes, and snippets.

Last active Nov 2, 2019
What would you like to do?
fun specificUser(@PathVariable id: Int): ResponseEntity<EntityModel<User>> {
if(dataBean.users.filter { == id }.isEmpty()){
return ResponseEntity(HttpStatus.NOT_FOUND)
return ResponseEntity(EntityModel(dataBean.users.filter { == id }.first(),
linkTo(methodOn("users")), HttpStatus.OK)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment