查询时,chain特殊处理, 不使用正则
This commit is contained in:
parent
f38f5f5fd1
commit
d0e8679527
@ -120,6 +120,8 @@ export abstract class BaseModule extends FindOrCreate {
|
|||||||
case 'String':
|
case 'String':
|
||||||
if (typeof params[key] === 'object') {
|
if (typeof params[key] === 'object') {
|
||||||
opt[key] = params[key]
|
opt[key] = params[key]
|
||||||
|
} else if (key === 'chain') {
|
||||||
|
opt[key] = params[key] + ''
|
||||||
} else {
|
} else {
|
||||||
opt[key] = { $regex: params[key], $options: 'i' }
|
opt[key] = { $regex: params[key], $options: 'i' }
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user