mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 21:16:49 +00:00
fix(apiv2): don't erroneously expose helper methods as endpoints
asp.net why
This commit is contained in:
parent
8e1409bd17
commit
611fc65a99
1 changed files with 3 additions and 3 deletions
|
|
@ -74,21 +74,21 @@ namespace PluralKit.API
|
|||
return Task.FromResult<PKGroup?>(null);
|
||||
}
|
||||
|
||||
public LookupContext ContextFor(PKSystem system)
|
||||
protected LookupContext ContextFor(PKSystem system)
|
||||
{
|
||||
HttpContext.Items.TryGetValue("SystemId", out var systemId);
|
||||
if (systemId == null) return LookupContext.ByNonOwner;
|
||||
return ((SystemId)systemId) == system.Id ? LookupContext.ByOwner : LookupContext.ByNonOwner;
|
||||
}
|
||||
|
||||
public LookupContext ContextFor(PKMember member)
|
||||
protected LookupContext ContextFor(PKMember member)
|
||||
{
|
||||
HttpContext.Items.TryGetValue("SystemId", out var systemId);
|
||||
if (systemId == null) return LookupContext.ByNonOwner;
|
||||
return ((SystemId)systemId) == member.System ? LookupContext.ByOwner : LookupContext.ByNonOwner;
|
||||
}
|
||||
|
||||
public LookupContext ContextFor(PKGroup group)
|
||||
protected LookupContext ContextFor(PKGroup group)
|
||||
{
|
||||
HttpContext.Items.TryGetValue("SystemId", out var systemId);
|
||||
if (systemId == null) return LookupContext.ByNonOwner;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue