Removes duplicate perpage and orderby params.

This commit is contained in:
mateuswetah 2022-06-22 14:58:09 -03:00
parent ccb2e4f0c3
commit a1baa8b5a9
1 changed files with 2 additions and 2 deletions

View File

@ -74,7 +74,7 @@ const useTainacanStore = defineStore("tainacan", {
try { try {
const wpStore = useWpStore(); const wpStore = useWpStore();
let endpoint = `${wpStore.userSiteUrl}/wp-json/tainacan/v2/collection/${collectionId}/items?fetch_only=id,title,thumbnail&perpage=12&orderby=modified`; let endpoint = `${wpStore.userSiteUrl}/wp-json/tainacan/v2/collection/${collectionId}/items?fetch_only=id,title,thumbnail`;
if (params && params.perPage) if (params && params.perPage)
endpoint += '&perpage=' + params.perPage; endpoint += '&perpage=' + params.perPage;
@ -82,7 +82,7 @@ const useTainacanStore = defineStore("tainacan", {
if (params && params.orderBy) if (params && params.orderBy)
endpoint += '&orderby=' + params.orderBy; endpoint += '&orderby=' + params.orderBy;
if(params.reset){ if (params.reset) {
this.collectionItems = []; this.collectionItems = [];
this.nextCollectionsPage = 1; this.nextCollectionsPage = 1;
} }