mirror of
https://github.com/n8n-io/n8n.git
synced 2025-02-02 07:01:30 -08:00
fix(core): Include projectId
in range query middleware (#11590)
This commit is contained in:
parent
ca75020821
commit
a6070afdda
|
@ -108,6 +108,22 @@ describe('`parseRangeQuery` middleware', () => {
|
|||
expect(nextFn).toBeCalledTimes(1);
|
||||
});
|
||||
|
||||
test('should parse `projectId` field', () => {
|
||||
const req = mock<ExecutionRequest.GetMany>({
|
||||
query: {
|
||||
filter: '{ "projectId": "123" }',
|
||||
limit: undefined,
|
||||
firstId: undefined,
|
||||
lastId: undefined,
|
||||
},
|
||||
});
|
||||
|
||||
parseRangeQuery(req, res, nextFn);
|
||||
|
||||
expect(req.rangeQuery.projectId).toBe('123');
|
||||
expect(nextFn).toBeCalledTimes(1);
|
||||
});
|
||||
|
||||
test('should delete invalid fields', () => {
|
||||
const req = mock<ExecutionRequest.GetMany>({
|
||||
query: {
|
||||
|
|
|
@ -66,6 +66,7 @@ export const schemaGetExecutionsQueryFilter = {
|
|||
startedBefore: { type: 'date-time' },
|
||||
annotationTags: { type: 'array', items: { type: 'string' } },
|
||||
vote: { type: 'string' },
|
||||
projectId: { type: 'string' },
|
||||
},
|
||||
$defs: {
|
||||
metadata: {
|
||||
|
|
Loading…
Reference in a new issue