@inspirer-dev/crm-dashboard 1.0.56 → 1.0.58

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.
@@ -6,7 +6,7 @@ const getBackendUrl = async (): Promise<string> => {
6
6
  }
7
7
 
8
8
  try {
9
- const res = await fetch('/api/crm-dashboard/config');
9
+ const res = await fetch('/crm-dashboard/config');
10
10
  console.log('{CRM}: res', res);
11
11
  if (res.ok) {
12
12
  const data = await res.json();
@@ -47,7 +47,7 @@ const getBackendUrl = async () => {
47
47
  return cachedUrl;
48
48
  }
49
49
  try {
50
- const res = await fetch("/api/crm-dashboard/config");
50
+ const res = await fetch("/crm-dashboard/config");
51
51
  console.log("{CRM}: res", res);
52
52
  if (res.ok) {
53
53
  const data = await res.json();
@@ -43,7 +43,7 @@ const getBackendUrl = async () => {
43
43
  return cachedUrl;
44
44
  }
45
45
  try {
46
- const res = await fetch("/api/crm-dashboard/config");
46
+ const res = await fetch("/crm-dashboard/config");
47
47
  console.log("{CRM}: res", res);
48
48
  if (res.ok) {
49
49
  const data = await res.json();
@@ -149,7 +149,7 @@ const index = {
149
149
  Component: async () => {
150
150
  const component = await Promise.resolve().then(() => require(
151
151
  /* webpackChunkName: "crm-dashboard-page" */
152
- "../_chunks/index-DR3sa2xB.js"
152
+ "../_chunks/index-Drva5qsu.js"
153
153
  ));
154
154
  return component;
155
155
  },
@@ -148,7 +148,7 @@ const index = {
148
148
  Component: async () => {
149
149
  const component = await import(
150
150
  /* webpackChunkName: "crm-dashboard-page" */
151
- "../_chunks/index-Byaiy7o6.mjs"
151
+ "../_chunks/index-dYpacy_L.mjs"
152
152
  );
153
153
  return component;
154
154
  },
@@ -55,7 +55,7 @@ const controller = ({ strapi }) => ({
55
55
  const controllers = {
56
56
  controller
57
57
  };
58
- const routes = [
58
+ const adminRoutes = [
59
59
  {
60
60
  method: "GET",
61
61
  path: "/",
@@ -69,7 +69,8 @@ const routes = [
69
69
  path: "/config",
70
70
  handler: "controller.getConfig",
71
71
  config: {
72
- policies: []
72
+ policies: [],
73
+ auth: false
73
74
  }
74
75
  },
75
76
  {
@@ -89,6 +90,12 @@ const routes = [
89
90
  }
90
91
  }
91
92
  ];
93
+ const routes = {
94
+ admin: {
95
+ type: "admin",
96
+ routes: adminRoutes
97
+ }
98
+ };
92
99
  const middlewares = {};
93
100
  const policies = {};
94
101
  function bind(fn, thisArg) {
@@ -54,7 +54,7 @@ const controller = ({ strapi }) => ({
54
54
  const controllers = {
55
55
  controller
56
56
  };
57
- const routes = [
57
+ const adminRoutes = [
58
58
  {
59
59
  method: "GET",
60
60
  path: "/",
@@ -68,7 +68,8 @@ const routes = [
68
68
  path: "/config",
69
69
  handler: "controller.getConfig",
70
70
  config: {
71
- policies: []
71
+ policies: [],
72
+ auth: false
72
73
  }
73
74
  },
74
75
  {
@@ -88,6 +89,12 @@ const routes = [
88
89
  }
89
90
  }
90
91
  ];
92
+ const routes = {
93
+ admin: {
94
+ type: "admin",
95
+ routes: adminRoutes
96
+ }
97
+ };
91
98
  const middlewares = {};
92
99
  const policies = {};
93
100
  function bind(fn, thisArg) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inspirer-dev/crm-dashboard",
3
- "version": "1.0.56",
3
+ "version": "1.0.58",
4
4
  "description": "CRM Dashboard and Tools",
5
5
  "strapi": {
6
6
  "name": "crm-dashboard",
@@ -1,4 +1,4 @@
1
- export default [
1
+ const adminRoutes = [
2
2
  {
3
3
  method: 'GET',
4
4
  path: '/',
@@ -13,6 +13,7 @@ export default [
13
13
  handler: 'controller.getConfig',
14
14
  config: {
15
15
  policies: [],
16
+ auth: false,
16
17
  },
17
18
  },
18
19
  {
@@ -32,3 +33,10 @@ export default [
32
33
  },
33
34
  },
34
35
  ];
36
+
37
+ export default {
38
+ admin: {
39
+ type: 'admin',
40
+ routes: adminRoutes,
41
+ },
42
+ };