fix: windows system the path can not use colon

This commit is contained in:
chenos 2021-04-18 15:17:19 +08:00
parent 8df85e0b20
commit bbcd310169
3 changed files with 3 additions and 5 deletions

View File

@ -2,7 +2,7 @@ import { Model, ModelCtor } from '@nocobase/database';
import { actions } from '@nocobase/actions'; import { actions } from '@nocobase/actions';
import { flatToTree } from '../utils'; import { flatToTree } from '../utils';
export default async (ctx, next) => { export const list = async (ctx, next) => {
await actions.common.list(ctx, async () => { await actions.common.list(ctx, async () => {
const items = ctx.body.rows as any; const items = ctx.body.rows as any;
ctx.body.rows = flatToTree(items.map(item => item.toJSON()), { ctx.body.rows = flatToTree(items.map(item => item.toJSON()), {

View File

@ -396,5 +396,3 @@ export const getInfo = async (ctx: actions.Context, next) => {
ctx.body = data; ctx.body = data;
await next(); await next();
}; };
export default getInfo;

View File

@ -7,10 +7,10 @@ import getRoutes from './actions/getRoutes';
import getPageInfo from './actions/getPageInfo'; import getPageInfo from './actions/getPageInfo';
import * as rolesPagesActions from './actions/roles.pages'; import * as rolesPagesActions from './actions/roles.pages';
import getCollections from './actions/getCollections'; import getCollections from './actions/getCollections';
import menusList from './actions/menus:list'; import { list as menusList } from './actions/menus';
import getTree from './actions/getTree'; import getTree from './actions/getTree';
import getInfo from './actions/getInfo'; 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 { RANDOMSTRING } from './fields/randomString';
import { registerFields, registerModels } from '@nocobase/database'; import { registerFields, registerModels } from '@nocobase/database';
import { BaseModel } from './models/BaseModel' import { BaseModel } from './models/BaseModel'