mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
Add system and member privacy support
This commit is contained in:
parent
f0cc5c5961
commit
98613c4287
17 changed files with 317 additions and 59 deletions
|
|
@ -11,10 +11,12 @@ namespace PluralKit.API.Controllers
|
|||
public class AccountController: ControllerBase
|
||||
{
|
||||
private IDataStore _data;
|
||||
private TokenAuthService _auth;
|
||||
|
||||
public AccountController(IDataStore data)
|
||||
public AccountController(IDataStore data, TokenAuthService auth)
|
||||
{
|
||||
_data = data;
|
||||
_auth = auth;
|
||||
}
|
||||
|
||||
[HttpGet("{aid}")]
|
||||
|
|
@ -23,7 +25,7 @@ namespace PluralKit.API.Controllers
|
|||
var system = await _data.GetSystemByAccount(aid);
|
||||
if (system == null) return NotFound("Account not found.");
|
||||
|
||||
return Ok(system.ToJson());
|
||||
return Ok(system.ToJson(_auth.ContextFor(system)));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue