user and role controllers

This commit is contained in:
Julian Krauser 2024-09-01 14:55:05 +02:00
parent 6865507545
commit ab01fc2f76
25 changed files with 769 additions and 26 deletions

View file

@ -11,6 +11,7 @@ export default abstract class RoleService {
return await dataSource
.getRepository(role)
.createQueryBuilder("role")
.leftJoinAndSelect("role.permissions", "role_permissions")
.getMany()
.then((res) => {
return res;
@ -29,6 +30,7 @@ export default abstract class RoleService {
return await dataSource
.getRepository(role)
.createQueryBuilder("role")
.leftJoinAndSelect("role.permissions", "role_permissions")
.where("role.id = :id", { id: id })
.getOneOrFail()
.then((res) => {