update users set email = '
This commit is contained in:
@ -84,14 +84,18 @@ export class UserController {
|
||||
const { whereAttr, whereVal } = CommonHelper.handleFilter({
|
||||
filter: param.filter,
|
||||
col_any_eq: ["email"],
|
||||
col_any_like: ["User.name", "User.username"],
|
||||
col_any_like: ["User.name", "User.username", "roles.name"], // ← tambah roles.name
|
||||
});
|
||||
|
||||
const res_count = userRepository.createQueryBuilder().where(whereAttr, whereVal);
|
||||
const res_count = userRepository
|
||||
.createQueryBuilder("User")
|
||||
.leftJoin("User.roles", "roles")
|
||||
.where(whereAttr, whereVal);
|
||||
|
||||
const subquery = userRepository
|
||||
.createQueryBuilder("User")
|
||||
.select("User.id", "id")
|
||||
.leftJoin("User.roles", "roles")
|
||||
.where(whereAttr, whereVal)
|
||||
.orderBy("User." + param.order_field, param.order_direction)
|
||||
.offset(offset)
|
||||
|
||||
Reference in New Issue
Block a user