feat: Adding product-categories endpoint
This commit is contained in:
@@ -8,6 +8,9 @@ function getPagination( query ){
|
||||
|
||||
if( query.page ){
|
||||
limit.page = parseInt( query.page ) || 0;
|
||||
if( limit.page < 0 ){
|
||||
limit.page = 0;
|
||||
}
|
||||
}
|
||||
if( query.elements ){
|
||||
limit.elements = parseInt( query.elements ) || 10;
|
||||
@@ -15,6 +18,9 @@ function getPagination( query ){
|
||||
if( limit.elements > 1000 ){
|
||||
limit.elements = 1000;
|
||||
}
|
||||
else if( limit.elements < 0 ){
|
||||
limit.elements = 10;
|
||||
}
|
||||
}
|
||||
return limit;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user