Uses fallback paramaters only if no perpage and orderby is passed.

This commit is contained in:
mateuswetah 2022-06-22 15:01:19 -03:00
parent a1baa8b5a9
commit dcfdfe4ee0
1 changed files with 4 additions and 0 deletions

View File

@ -78,9 +78,13 @@ const useTainacanStore = defineStore("tainacan", {
if (params && params.perPage) if (params && params.perPage)
endpoint += '&perpage=' + params.perPage; endpoint += '&perpage=' + params.perPage;
else
endpoint += '&perpage=12';
if (params && params.orderBy) if (params && params.orderBy)
endpoint += '&orderby=' + params.orderBy; endpoint += '&orderby=' + params.orderBy;
else
endpoint += '&orderby=modified';
if (params.reset) { if (params.reset) {
this.collectionItems = []; this.collectionItems = [];