update users set email = '

This commit is contained in:
wayanrivan
2026-05-28 15:36:18 +07:00
parent 93909bfe63
commit 0da7950c01

View File

@ -84,14 +84,18 @@ export class UserController {
const { whereAttr, whereVal } = CommonHelper.handleFilter({ const { whereAttr, whereVal } = CommonHelper.handleFilter({
filter: param.filter, filter: param.filter,
col_any_eq: ["email"], 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 const subquery = userRepository
.createQueryBuilder("User") .createQueryBuilder("User")
.select("User.id", "id") .select("User.id", "id")
.leftJoin("User.roles", "roles")
.where(whereAttr, whereVal) .where(whereAttr, whereVal)
.orderBy("User." + param.order_field, param.order_direction) .orderBy("User." + param.order_field, param.order_direction)
.offset(offset) .offset(offset)