@ApiRestController public class CityController extends BaseController{
@GetMapping("/cities")
public ResponseEntity<CitiesResponse> getAll(
@RequestParam(value = "pageNumber", defaultValue = "1") int pageNumber,
@RequestParam(value = "pageSize", defaultValue = "100") int pageSize,
@RequestParam(value = "sortBy", defaultValue = "id", required = false) String sortBy,
@RequestParam(value = "sortDirection", defaultValue = "asc", required = false) String sortDirection,
@RequestParam(value = "search", required = false) String search) {
return new ResponseEntity(cityService.getAll(pageNumber, pageSize, sortBy, sortDirection, search), HttpStatus.OK);
}
}
Aucun commentaire:
Enregistrer un commentaire