Commit cc73d672 authored by neo's avatar neo

[dev] fix page from begin 1

parent c48c70f2
......@@ -17,6 +17,7 @@ public class InputInvoiceController {
@RequestMapping(method = GET)
public Page<InputInvoice> getAll(@RequestParam(defaultValue = "0") int page, @RequestParam(defaultValue = "20") int size) {
return repository.findAll(PageRequest.of(page, size));
if(page<0)page=0;
return repository.findAll(PageRequest.of(page-1, size));
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment