diff --git a/packages/plugin-pages/src/actions/menus:list.ts b/packages/plugin-pages/src/actions/menus.ts similarity index 90% rename from packages/plugin-pages/src/actions/menus:list.ts rename to packages/plugin-pages/src/actions/menus.ts index 0cf615575..0c2caeb26 100644 --- a/packages/plugin-pages/src/actions/menus:list.ts +++ b/packages/plugin-pages/src/actions/menus.ts @@ -2,7 +2,7 @@ import { Model, ModelCtor } from '@nocobase/database'; import { actions } from '@nocobase/actions'; import { flatToTree } from '../utils'; -export default async (ctx, next) => { +export const list = async (ctx, next) => { await actions.common.list(ctx, async () => { const items = ctx.body.rows as any; ctx.body.rows = flatToTree(items.map(item => item.toJSON()), { diff --git a/packages/plugin-pages/src/actions/views_v2:getInfo.ts b/packages/plugin-pages/src/actions/views_v2.ts similarity index 99% rename from packages/plugin-pages/src/actions/views_v2:getInfo.ts rename to packages/plugin-pages/src/actions/views_v2.ts index 7bfb04a8e..d104c7f11 100644 --- a/packages/plugin-pages/src/actions/views_v2:getInfo.ts +++ b/packages/plugin-pages/src/actions/views_v2.ts @@ -396,5 +396,3 @@ export const getInfo = async (ctx: actions.Context, next) => { ctx.body = data; await next(); }; - -export default getInfo; diff --git a/packages/plugin-pages/src/server.ts b/packages/plugin-pages/src/server.ts index c00e3dfa9..7d486ac91 100644 --- a/packages/plugin-pages/src/server.ts +++ b/packages/plugin-pages/src/server.ts @@ -7,10 +7,10 @@ import getRoutes from './actions/getRoutes'; import getPageInfo from './actions/getPageInfo'; import * as rolesPagesActions from './actions/roles.pages'; import getCollections from './actions/getCollections'; -import menusList from './actions/menus:list'; +import { list as menusList } from './actions/menus'; import getTree from './actions/getTree'; import getInfo from './actions/getInfo'; -import viewGetInfo from './actions/views_v2:getInfo'; +import { getInfo as viewGetInfo } from './actions/views_v2'; import { RANDOMSTRING } from './fields/randomString'; import { registerFields, registerModels } from '@nocobase/database'; import { BaseModel } from './models/BaseModel'