fix(api): generate token if needed in discord oauth response
This commit is contained in:
parent
9848b88d5b
commit
62c5c3865a
@ -135,6 +135,9 @@ public class PrivateController: PKControllerBase
|
|||||||
// guilds.Select(g => new HashEntry(g.Value<string>("id"), true)).ToArray()
|
// 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();
|
var o = new JObject();
|
||||||
|
|
||||||
o.Add("system", system.ToJson(LookupContext.ByOwner));
|
o.Add("system", system.ToJson(LookupContext.ByOwner));
|
||||||
|
Loading…
Reference in New Issue
Block a user