pagination parse

This commit is contained in:
Evert Prants 2022-08-27 13:56:31 +03:00
parent 266645d08f
commit 13eefb166a
Signed by: evert
GPG Key ID: 1688DA83D222D0B5

View File

@ -8,8 +8,8 @@ import {
export class PaginationService {
public paginate(options: PageOptions, rowCount: number): PaginationOptions {
const paginationOptions: PaginationOptions = {
page: options.page || 1,
pageSize: options.pageSize || 50,
page: parseInt(options.page?.toString(), 10) || 1,
pageSize: parseInt(options.pageSize?.toString(), 10) || 50,
rowCount,
};