fix: Prevent sending notifications to deactivated users
This commit is contained in:
@@ -48,7 +48,17 @@ const createOne = async (values) => {
|
||||
return User.create({ ...values }).fetch();
|
||||
};
|
||||
|
||||
const getByIds = (ids) => defaultFind(ids);
|
||||
const getByIds = (ids, { withDeactivated = true } = {}) => {
|
||||
const criteria = {
|
||||
id: ids,
|
||||
};
|
||||
|
||||
if (!withDeactivated) {
|
||||
criteria.isDeactivated = false;
|
||||
}
|
||||
|
||||
return defaultFind(criteria);
|
||||
};
|
||||
|
||||
const getAll = ({ roleOrRoles } = {}) =>
|
||||
defaultFind({
|
||||
|
||||
Reference in New Issue
Block a user