get admins, get system roles,
This commit is contained in:
@@ -104,6 +104,18 @@ export class RolesService {
|
||||
return role;
|
||||
}
|
||||
|
||||
async findAllSystemRoles() {
|
||||
const roles = await this.roleRepository.find(
|
||||
{ isSystem: true },
|
||||
{
|
||||
orderBy: { createdAt: 'desc' },
|
||||
populate: ['permissions', 'restaurant'],
|
||||
},
|
||||
);
|
||||
|
||||
return roles;
|
||||
}
|
||||
|
||||
async remove(restId: string, id: string) {
|
||||
const role = await this.roleRepository.findOne(
|
||||
{ id, restaurant: { id: restId } },
|
||||
|
||||
Reference in New Issue
Block a user