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