Add front history pagination; upgrade more store methods

This commit is contained in:
Ske
2020-01-18 00:58:35 +01:00
parent 8a689ac0f2
commit b347d2d557
8 changed files with 178 additions and 109 deletions

View File

@@ -70,10 +70,11 @@ namespace PluralKit.API.Controllers
if (!system.MemberListPrivacy.CanAccess(_auth.ContextFor(system)))
return StatusCode(StatusCodes.Status403Forbidden, "Unauthorized to view member list.");
var members = await _data.GetSystemMembers(system);
return Ok(members
var members = _data.GetSystemMembers(system);
return Ok(await members
.Where(m => m.MemberPrivacy.CanAccess(_auth.ContextFor(system)))
.Select(m => m.ToJson(_auth.ContextFor(system))));
.Select(m => m.ToJson(_auth.ContextFor(system)))
.ToListAsync());
}
[HttpGet("{hid}/switches")]