Using links in the common objects

This commit is contained in:
Zoe Roux
2021-03-06 00:53:21 +01:00
parent b8fcc5b7cf
commit 76cdbc77a3
23 changed files with 191 additions and 4931 deletions
@@ -349,6 +349,10 @@ namespace Kyoo.Controllers
(People p, nameof(People.Roles)) => PeopleRepository
.GetFromPeople(obj.ID)
.Then(x => p.Roles = x),
(ProviderID p, nameof(ProviderID.Libraries)) => LibraryRepository
.GetAll(x => x.Providers.Any(y => y.ID == obj.ID))
.Then(x => p.Libraries = x),
_ => throw new ArgumentException($"Couldn't find a way to load {member} of {obj.Slug}.")
};