openxiangda 1.0.149 → 1.0.151

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.
@@ -11,6 +11,7 @@ import {
11
11
  OpenXiangdaPageProvider,
12
12
  OpenXiangdaProvider,
13
13
  PublicAccessGate,
14
+ RuntimeAuthGuard,
14
15
  } from "openxiangda/runtime/react";
15
16
 
16
17
  import { AdminShell } from "@/layouts/AdminShell";
@@ -122,7 +123,11 @@ export const router = createBrowserRouter([
122
123
  },
123
124
  {
124
125
  path: "admin",
125
- element: <AdminShell />,
126
+ element: (
127
+ <RuntimeAuthGuard>
128
+ <AdminShell />
129
+ </RuntimeAuthGuard>
130
+ ),
126
131
  children: [
127
132
  { index: true, element: <AdminDashboardPage /> },
128
133
  { path: "data/:formUuid", element: routeElement(<DataRoutePage />) },
@@ -21,7 +21,7 @@ export default async function syncRolesToPlatform(ctx: any) {
21
21
  for (const row of rows) {
22
22
  const roleCode = String(row.roleCode || "").trim().toLowerCase();
23
23
  if (!roleCode) continue;
24
- await ctx.platform.api.post(`/openxiangda-api/v1/apps/${appType}/roles`, {
24
+ await ctx.platform.api.post(`apps/${appType}/roles`, {
25
25
  code: roleCode,
26
26
  name: row.roleName || roleCode,
27
27
  description: "由业务角色维护表同步",