Skip to content

Instantly share code, notes, and snippets.

@AlexeySoshin
Created October 22, 2017 17:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexeySoshin/8c51591178892228d08b3aece160477e to your computer and use it in GitHub Desktop.
Save AlexeySoshin/8c51591178892228d08b3aece160477e to your computer and use it in GitHub Desktop.
@PostMapping("/")
fun addCat(@RequestBody cat : Cat) {
UUID.randomUUID().let { id ->
cat.id = id
cats.put(id, cat)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment