Advanced filter by ref
gitea/salix/2150-travel_filter_by_ref This commit looks good
Details
gitea/salix/2150-travel_filter_by_ref This commit looks good
Details
This commit is contained in:
parent
21ace6ef4e
commit
70210e87c9
|
@ -63,6 +63,10 @@ module.exports = Self => {
|
||||||
type: 'Number',
|
type: 'Number',
|
||||||
description: 'The totalEntries filter',
|
description: 'The totalEntries filter',
|
||||||
http: {source: 'query'}
|
http: {source: 'query'}
|
||||||
|
}, {
|
||||||
|
arg: 'ref',
|
||||||
|
type: 'string',
|
||||||
|
description: 'The reference'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
returns: {
|
returns: {
|
||||||
|
@ -82,7 +86,7 @@ module.exports = Self => {
|
||||||
case 'search':
|
case 'search':
|
||||||
return {'t.id': value};
|
return {'t.id': value};
|
||||||
case 'ref':
|
case 'ref':
|
||||||
return {[param]: {regexp: value}};
|
return {'t.ref': {like: `%${value}%`}};
|
||||||
case 'shippedFrom':
|
case 'shippedFrom':
|
||||||
return {'t.shipped': {gte: value}};
|
return {'t.shipped': {gte: value}};
|
||||||
case 'shippedTo':
|
case 'shippedTo':
|
||||||
|
|
Loading…
Reference in New Issue