Skip to content

Commit

Permalink
Change api endpoint url
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelreichor committed Nov 8, 2024
1 parent 73a6d4b commit 53fe569
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/rotten-peaches-exist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'js-craftcms-api': patch
---

Change api endpoint url from `/v1/api/customQuery` to `/v1/api/queryApi/customQuery`.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export function buildCraftQueryUrl<T extends ElementType>(elementType: T): Query

const queryString = new URLSearchParams(queryParams).toString();
const previewToken = getPreviewToken();
return `/v1/api/customQuery?${queryString}${previewToken ? '&token=' + previewToken : ''}`;
return `/v1/api/queryApi/customQuery?${queryString}${previewToken ? '&token=' + previewToken : ''}`;
},
} as QueryBuilderMap[T];

Expand Down

0 comments on commit 53fe569

Please sign in to comment.