keep trying

Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
2026-07-12 12:53:53 +08:00
parent ea3e82e54c
commit d0a64a8043
8 changed files with 55 additions and 80 deletions
+4 -1
View File
@@ -337,7 +337,10 @@ exports.getUsersNotInGroup = async (req, res) => {
const memberIds = members.map((m) => m.user_id);
const users = await mdl_Users.findAll({
where: { user_id: { [Op.notIn]: memberIds.length ? memberIds : [0] } },
where: {
user_id: { [Op.notIn]: memberIds.length ? memberIds : [0] },
acc_type: 'user', // exclude staff/admin — only regular users can be added to a group
},
attributes: [
'user_id',
[Sequelize.literal(`("User"."personal_info"->'name'->>'full_name')`), 'full_name'],