mirror of
https://github.com/n8n-io/n8n.git
synced 2025-03-05 20:50:17 -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);
|
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', () => {
|
test('should delete invalid fields', () => {
|
||||||
const req = mock<ExecutionRequest.GetMany>({
|
const req = mock<ExecutionRequest.GetMany>({
|
||||||
query: {
|
query: {
|
||||||
|
|
|
@ -66,6 +66,7 @@ export const schemaGetExecutionsQueryFilter = {
|
||||||
startedBefore: { type: 'date-time' },
|
startedBefore: { type: 'date-time' },
|
||||||
annotationTags: { type: 'array', items: { type: 'string' } },
|
annotationTags: { type: 'array', items: { type: 'string' } },
|
||||||
vote: { type: 'string' },
|
vote: { type: 'string' },
|
||||||
|
projectId: { type: 'string' },
|
||||||
},
|
},
|
||||||
$defs: {
|
$defs: {
|
||||||
metadata: {
|
metadata: {
|
||||||
|
|
Loading…
Reference in a new issue