mirror of
https://github.com/SyncrowIOT/backend.git
synced 2025-11-27 01:04:54 +00:00
Add method to find role by type
This commit is contained in:
@ -13,4 +13,12 @@ export class RoleService {
|
|||||||
);
|
);
|
||||||
return roles;
|
return roles;
|
||||||
}
|
}
|
||||||
|
async findRoleByType(roleType: RoleType) {
|
||||||
|
const role = await this.roleTypeRepository.findOne({
|
||||||
|
where: {
|
||||||
|
type: roleType,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return role;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user