get admins, get system roles,

This commit is contained in:
2025-12-28 10:26:24 +03:30
parent 4da1680b29
commit 9b409f3e07
5 changed files with 139 additions and 37 deletions
@@ -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 } },