From 15b6553be747cc0aa8933450fe4e3c603cc133e3 Mon Sep 17 00:00:00 2001 From: Christian Meter Date: Thu, 5 Sep 2024 16:56:14 +0200 Subject: [PATCH] Swap parameters --- package.json | 2 +- src/index.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7d04636..061eefb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@schnaq/strapi4-utils", - "version": "1.0.3", + "version": "1.0.4", "description": "Utility functions for working with Strapi v4", "main": "dist/index.js", "module": "dist/index.mjs", diff --git a/src/index.ts b/src/index.ts index aeb06b1..01c6a52 100644 --- a/src/index.ts +++ b/src/index.ts @@ -13,16 +13,16 @@ import { * @param path The path to query. * @param body The body to send. * @param method The HTTP method to use. - * @param apiUrl The API URL to the Strapi Backend. * @param token The token to use for authentication. Defaults to a Strapi API token. + * @param apiUrl The API URL to the Strapi Backend. */ export async function queryAPI([ path, body, method, - apiUrl = process.env.NEXT_PUBLIC_STRAPI_API_URL || process.env.STRAPI_API_URL, token = process.env.NEXT_PUBLIC_STRAPI_API_TOKEN || process.env.STRAPI_API_TOKEN, + apiUrl = process.env.NEXT_PUBLIC_STRAPI_API_URL || process.env.STRAPI_API_URL, ]: [string, any?, string?, string?, string?]): Promise< StrapiResponse | undefined > {