查询时,chain特殊处理, 不使用正则

This commit is contained in:
CounterFire2023 2023-07-16 18:09:47 +08:00
parent f38f5f5fd1
commit d0e8679527

View File

@ -120,6 +120,8 @@ export abstract class BaseModule extends FindOrCreate {
case 'String':
if (typeof params[key] === 'object') {
opt[key] = params[key]
} else if (key === 'chain') {
opt[key] = params[key] + ''
} else {
opt[key] = { $regex: params[key], $options: 'i' }
}