mirror of
https://github.com/ershisan99/flashcards-api.git
synced 2025-12-17 12:33:22 +00:00
add auth
This commit is contained in:
9
src/infrastructure/common/pagination.service.ts
Normal file
9
src/infrastructure/common/pagination.service.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
export class Pagination {
|
||||
static getPaginationData(query) {
|
||||
const page = typeof query.PageNumber === 'string' ? +query.PageNumber : 1;
|
||||
const pageSize = typeof query.PageSize === 'string' ? +query.PageSize : 10;
|
||||
const searchNameTerm =
|
||||
typeof query.SearchNameTerm === 'string' ? query.SearchNameTerm : '';
|
||||
return { page, pageSize, searchNameTerm };
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user