feat(api): add config to discord oauth response

This commit is contained in:
spiral 2022-05-09 14:33:40 -04:00
parent 3a99f65b49
commit 0db7eebb17
No known key found for this signature in database
GPG Key ID: 244A11E4B0BCF40E

View File

@ -124,6 +124,8 @@ public class PrivateController: PKControllerBase
if (system == null)
return BadRequest(PrivateJsonExt.ObjectWithError("User does not have a system registered!"));
var config = await _repo.GetSystemConfig(system.Id);
// TODO
// resp = await client.GetAsync("https://discord.com/api/v10/users/@me/guilds");
@ -136,6 +138,7 @@ public class PrivateController: PKControllerBase
var o = new JObject();
o.Add("system", system.ToJson(LookupContext.ByOwner));
o.Add("config", config.ToJson());
o.Add("user", user);
o.Add("token", system.Token);