mirror of
https://github.com/sergeyyarkov/educt-server.git
synced 2026-10-11 10:19:20 +03:00
fix: user search to ilike op
This commit is contained in:
parent
0eb55c6be4
commit
a5dfa1b3fa
@ -85,9 +85,9 @@ export default class UserRepository {
|
|||||||
|
|
||||||
if (search) {
|
if (search) {
|
||||||
query
|
query
|
||||||
.orWhere('first_name', 'like', `%${search}%`)
|
.orWhere('first_name', 'ilike', `%${search}%`)
|
||||||
.orWhere('last_name', 'like', `%${search}%`)
|
.orWhere('last_name', 'ilike', `%${search}%`)
|
||||||
.orWhereRaw(`CONCAT(first_name, ' ', last_name) = ?`, [search])
|
.orWhereRaw(`CONCAT(first_name, ' ', last_name) ilike ?`, [search])
|
||||||
.orWhere('email', 'like', `${search}`)
|
.orWhere('email', 'like', `${search}`)
|
||||||
.orWhere('id', 'like', `${search}`);
|
.orWhere('id', 'like', `${search}`);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user