mirror of
https://gitee.com/nocobase/nocobase.git
synced 2024-12-01 03:38:32 +08:00
fix: appends/except only use to get/list actions
This commit is contained in:
parent
53212ee47d
commit
ba6f3f7f7d
@ -62,14 +62,14 @@ api.resourcer.use(async (ctx: actions.Context, next) => {
|
||||
});
|
||||
|
||||
api.resourcer.use(async (ctx: actions.Context, next) => {
|
||||
const { resourceField, resourceName, fields = {} } = ctx.action.params;
|
||||
const { actionName, resourceField, resourceName, fields = {} } = ctx.action.params;
|
||||
const table = ctx.db.getTable(resourceField ? resourceField.options.target : resourceName);
|
||||
// ctx.state.developerMode = {[Op.not]: null};
|
||||
ctx.state.developerMode = false;
|
||||
if (table && table.hasField('developerMode') && ctx.state.developerMode === false) {
|
||||
ctx.action.setParam('filter.developerMode', ctx.state.developerMode);
|
||||
}
|
||||
if (table) {
|
||||
if (table && ['get', 'list'].includes(actionName)) {
|
||||
const except = fields.except || [];
|
||||
const appends = fields.appends || [];
|
||||
for (const [name, field] of table.getFields()) {
|
||||
|
Loading…
Reference in New Issue
Block a user