Fix reading lists not respecting age ratings (#3590)
This commit is contained in:
parent
5aa9699a99
commit
1244e4263e
2 changed files with 18 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using API.Data.Misc;
|
||||
using API.Entities;
|
||||
using API.Helpers;
|
||||
|
||||
|
@ -44,4 +45,13 @@ public static class AppUserExtensions
|
|||
OrderableHelper.ReorderItems(user.SideNavStreams);
|
||||
|
||||
}
|
||||
|
||||
public static AgeRestriction GetAgeRestriction(this AppUser user)
|
||||
{
|
||||
return new AgeRestriction()
|
||||
{
|
||||
AgeRating = user.AgeRestriction,
|
||||
IncludeUnknowns = user.AgeRestrictionIncludeUnknowns,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue