mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 04:56:49 +00:00
fix(api): generate token if needed in discord oauth response
This commit is contained in:
parent
9848b88d5b
commit
62c5c3865a
1 changed files with 3 additions and 0 deletions
|
|
@ -135,6 +135,9 @@ public class PrivateController: PKControllerBase
|
|||
// guilds.Select(g => new HashEntry(g.Value<string>("id"), true)).ToArray()
|
||||
// );
|
||||
|
||||
if (system.Token == null)
|
||||
system = await _repo.UpdateSystem(system.Id, new SystemPatch { Token = StringUtils.GenerateToken() });
|
||||
|
||||
var o = new JObject();
|
||||
|
||||
o.Add("system", system.ToJson(LookupContext.ByOwner));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue