Created
April 18, 2019 16:08
-
-
Save recursivecodes/128229e9e021bdfa14c8930988df0759 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Get("/list{/offset}{/max}") | |
List<Person> getPersons(@Nullable Optional<Integer> offset, @Nullable Optional<Integer> max) { | |
if( offset && max ) { | |
return personService.findAll([offset: offset.get(), max: max.get()]) | |
} | |
else { | |
return personService.findAll() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment