@strapi-community/plugin-better-auth-dashboard 1.0.0-alpha.3 → 1.0.0-alpha.5

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.
@@ -54,7 +54,7 @@ const index = {
54
54
  id: `${PLUGIN_ID}.plugin.name`,
55
55
  defaultMessage: "Auth Dashboard"
56
56
  },
57
- Component: async () => import("./Root-DBjGZL7H.mjs")
57
+ Component: async () => import("./Root-CJNOLkgF.mjs")
58
58
  });
59
59
  },
60
60
  bootstrap() {
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const index = require("./index-xZ2FHX3i.js");
3
+ const index = require("./index-C4--Z2Qg.js");
4
4
  exports.default = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "./index-BpruO4vo.mjs";
1
+ import { i } from "./index-QYGGdXAd.mjs";
2
2
  export {
3
3
  i as default
4
4
  };
@@ -62,12 +62,13 @@ const proxyController = () => ({
62
62
  ctx.set(key, value);
63
63
  });
64
64
  const contentType = response.headers.get("content-type");
65
- if (contentType?.includes("application/json")) {
66
- ctx.body = await response.json();
67
- } else if (contentType?.includes("text/")) {
68
- ctx.body = await response.text();
65
+ const text = await response.text();
66
+ if (!text) {
67
+ ctx.body = {};
68
+ } else if (contentType?.includes("application/json")) {
69
+ ctx.body = JSON.parse(text);
69
70
  } else {
70
- ctx.body = await response.text();
71
+ ctx.body = text;
71
72
  }
72
73
  }
73
74
  });
@@ -60,12 +60,13 @@ const proxyController = () => ({
60
60
  ctx.set(key, value);
61
61
  });
62
62
  const contentType = response.headers.get("content-type");
63
- if (contentType?.includes("application/json")) {
64
- ctx.body = await response.json();
65
- } else if (contentType?.includes("text/")) {
66
- ctx.body = await response.text();
63
+ const text = await response.text();
64
+ if (!text) {
65
+ ctx.body = {};
66
+ } else if (contentType?.includes("application/json")) {
67
+ ctx.body = JSON.parse(text);
67
68
  } else {
68
- ctx.body = await response.text();
69
+ ctx.body = text;
69
70
  }
70
71
  }
71
72
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi-community/plugin-better-auth-dashboard",
3
- "version": "1.0.0-alpha.3",
3
+ "version": "1.0.0-alpha.5",
4
4
  "description": "Better Auth dashboard for the Strapi admin panel",
5
5
  "keywords": [
6
6
  "strapi",