mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-23 06:25:24 -07:00
Small cleanup
This commit is contained in:
parent
fb319a712e
commit
96d7354124
1 changed files with 9 additions and 10 deletions
|
@ -48,17 +48,16 @@ namespace Ombi.Store.Repository.Requests
|
|||
|
||||
public IQueryable<MovieRequests> GetWithUser(bool anonimize)
|
||||
{
|
||||
var allRequests = Db.MovieRequests
|
||||
.Include(x => x.RequestedUser)
|
||||
.ThenInclude(x => x.NotificationUserIds)
|
||||
.ToList();
|
||||
|
||||
if (anonimize)
|
||||
if (!anonimize)
|
||||
{
|
||||
allRequests.ForEach(x => x.RequestedUser = null);
|
||||
allRequests.ForEach(x => x.RequestedUserId = null);
|
||||
}
|
||||
return allRequests.AsQueryable();
|
||||
return Db.MovieRequests
|
||||
.Include(x => x.RequestedUser)
|
||||
.ThenInclude(x => x.NotificationUserIds)
|
||||
.AsQueryable();
|
||||
} else
|
||||
{
|
||||
return Db.MovieRequests.AsQueryable(); //This still populates the RequestedUser for the logged in user (or so it seems...)
|
||||
}
|
||||
}
|
||||
|
||||
public async Task MarkAsAvailable(int id)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue