refactor(resourcer): allow empty object as values (#6070)

* refactor(resourcer): allow empty object as values

* fix(plugin-action-custom-request): fix test case
This commit is contained in:
Junyi 2025-01-16 09:41:17 +08:00 committed by GitHub
parent b9a5751410
commit d38f89db85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -377,7 +377,7 @@ export class ResourceManager {
ctx.action.mergeParams({
...query,
...params,
...(_.isEmpty(ctx.request.body) ? {} : { values: ctx.request.body }),
values: ctx.request.body,
});
}
return compose(ctx.action.getHandlers())(ctx, next);

View File

@ -57,7 +57,7 @@ describe('actions', () => {
filterByTk: 'test',
});
expect(res.status).toBe(200);
expect(params).toMatchSnapshot();
expect(params).toMatchObject({});
});
test('currentRecord.data', async () => {