diff --git a/.changeset/rotten-peaches-exist.md b/.changeset/rotten-peaches-exist.md new file mode 100644 index 0000000..fd8805b --- /dev/null +++ b/.changeset/rotten-peaches-exist.md @@ -0,0 +1,5 @@ +--- +'js-craftcms-api': patch +--- + +Change api endpoint url from `/v1/api/customQuery` to `/v1/api/queryApi/customQuery`. diff --git a/src/index.ts b/src/index.ts index 8f723a0..192204c 100644 --- a/src/index.ts +++ b/src/index.ts @@ -164,7 +164,7 @@ export function buildCraftQueryUrl(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];