From 2b1c32b34c425d26c96dcbafc925f712263519a6 Mon Sep 17 00:00:00 2001 From: chenos Date: Mon, 18 Mar 2024 18:28:35 +0800 Subject: [PATCH] fix(data-source-manager): resource prefix --- packages/core/data-source-manager/src/data-source.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/core/data-source-manager/src/data-source.ts b/packages/core/data-source-manager/src/data-source.ts index d0c09d8c9..f673f95d3 100644 --- a/packages/core/data-source-manager/src/data-source.ts +++ b/packages/core/data-source-manager/src/data-source.ts @@ -1,10 +1,10 @@ import { ACL } from '@nocobase/acl'; import { getNameByParams, parseRequest } from '@nocobase/resourcer'; -import compose from 'koa-compose'; -import { ResourceManager } from './resource-manager'; -import { loadDefaultActions } from './load-default-actions'; -import { ICollectionManager } from './types'; import EventEmitter from 'events'; +import compose from 'koa-compose'; +import { loadDefaultActions } from './load-default-actions'; +import { ResourceManager } from './resource-manager'; +import { ICollectionManager } from './types'; export type DataSourceOptions = any; @@ -30,7 +30,7 @@ export abstract class DataSource extends EventEmitter { this.acl = this.createACL(); this.resourceManager = this.createResourceManager({ - prefix: '/api', + prefix: process.env.API_BASE_PATH, ...options.resourceManager, });