Moved permissions to the new put mechanism

ref #39
This commit is contained in:
2020-12-20 17:29:04 +01:00
parent cc68948a20
commit b2bd6173a5
2 changed files with 6 additions and 8 deletions

View File

@@ -96,7 +96,7 @@ export class PermissionController {
return new ResponsePermission(existingPermission);
}
await this.permissionRepository.update(oldPermission, await permission.toPermission());
await this.permissionRepository.save(await permission.updatePermission(oldPermission));
return new ResponsePermission(await this.permissionRepository.findOne({ id: permission.id }, { relations: ['principal'] }));
}