@authrim/setup 0.1.73 → 0.1.74

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/web/ui.js +2 -2
  2. package/package.json +1 -1
package/dist/web/ui.js CHANGED
@@ -2642,7 +2642,7 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
2642
2642
 
2643
2643
  // API helpers (with session token authentication)
2644
2644
  async function api(endpoint, options = {}) {
2645
- const { headers: customHeaders, ...restOptions } = options;
2645
+ const { headers: customHeaders, body, ...restOptions } = options;
2646
2646
  const response = await fetch('/api' + endpoint, {
2647
2647
  ...restOptions,
2648
2648
  headers: {
@@ -2650,7 +2650,7 @@ export function getHtmlTemplate(sessionToken, manageOnly) {
2650
2650
  'X-Session-Token': SESSION_TOKEN,
2651
2651
  ...(customHeaders || {}),
2652
2652
  },
2653
- body: options.body ? JSON.stringify(options.body) : undefined,
2653
+ body: body ? (typeof body === 'string' ? body : JSON.stringify(body)) : undefined,
2654
2654
  });
2655
2655
  return response.json();
2656
2656
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authrim/setup",
3
- "version": "0.1.73",
3
+ "version": "0.1.74",
4
4
  "description": "CLI tool for setting up Authrim OIDC Provider on Cloudflare Workers",
5
5
  "type": "module",
6
6
  "bin": {