Skip to content

Commit

Permalink
Swap parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
n2o committed Sep 5, 2024
1 parent 51ea360 commit 15b6553
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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<T>([
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<T> | undefined
> {
Expand Down

0 comments on commit 15b6553

Please sign in to comment.