mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-12 08:40:11 +00:00
feat(api): add config to discord oauth response
This commit is contained in:
parent
3a99f65b49
commit
0db7eebb17
1 changed files with 3 additions and 0 deletions
|
|
@ -124,6 +124,8 @@ public class PrivateController: PKControllerBase
|
||||||
if (system == null)
|
if (system == null)
|
||||||
return BadRequest(PrivateJsonExt.ObjectWithError("User does not have a system registered!"));
|
return BadRequest(PrivateJsonExt.ObjectWithError("User does not have a system registered!"));
|
||||||
|
|
||||||
|
var config = await _repo.GetSystemConfig(system.Id);
|
||||||
|
|
||||||
// TODO
|
// TODO
|
||||||
|
|
||||||
// resp = await client.GetAsync("https://discord.com/api/v10/users/@me/guilds");
|
// resp = await client.GetAsync("https://discord.com/api/v10/users/@me/guilds");
|
||||||
|
|
@ -136,6 +138,7 @@ public class PrivateController: PKControllerBase
|
||||||
var o = new JObject();
|
var o = new JObject();
|
||||||
|
|
||||||
o.Add("system", system.ToJson(LookupContext.ByOwner));
|
o.Add("system", system.ToJson(LookupContext.ByOwner));
|
||||||
|
o.Add("config", config.ToJson());
|
||||||
o.Add("user", user);
|
o.Add("user", user);
|
||||||
o.Add("token", system.Token);
|
o.Add("token", system.Token);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue