diff --git a/src/controllers/user_activity.ts b/src/controllers/user_activity.ts index 2efe969..432a605 100644 --- a/src/controllers/user_activity.ts +++ b/src/controllers/user_activity.ts @@ -100,8 +100,17 @@ export class UserActivityController { .leftJoinAndMapOne('u.username', User, 'u', 'u.id = id_user') .where(whereAttr, whereVal); const res_list = userRepository.createQueryBuilder() - // .addSelect('(SELECT u.username FROM users u WHERE u.id = id_user)', 'username') - .leftJoinAndMapOne('u.username', User, 'u', 'u.id = id_user') + .select( + 'id,\n\ + id_user,\n\ + module,\n\ + description,\n\ + action,\n\ + url,\n\ + application,\n\ + created_at') + .addSelect('(SELECT u.username FROM users u WHERE u.id = id_user)', 'username') + // .leftJoinAndMapOne('u.username', User, 'u', 'u.id = id_user') .where(whereAttr, whereVal) .orderBy(param.order_field, param.order_direction) .offset(offset)