From 0db7eebb17ac84f9a4c75e3f6073e616e72d46b7 Mon Sep 17 00:00:00 2001 From: spiral Date: Mon, 9 May 2022 14:33:40 -0400 Subject: [PATCH] feat(api): add config to discord oauth response --- PluralKit.API/Controllers/PrivateController.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PluralKit.API/Controllers/PrivateController.cs b/PluralKit.API/Controllers/PrivateController.cs index 2c0eacf4..1043e5a4 100644 --- a/PluralKit.API/Controllers/PrivateController.cs +++ b/PluralKit.API/Controllers/PrivateController.cs @@ -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);