mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-05 05:17:54 +00:00
feat(webhooks): init, add service/models, add JSON to patch objects
This commit is contained in:
parent
08c5b78cc2
commit
71aec0d419
14 changed files with 551 additions and 2 deletions
|
|
@ -46,6 +46,8 @@ namespace PluralKit.Core
|
|||
public string BannerImage { get; }
|
||||
public string Color { get; }
|
||||
public string Token { get; }
|
||||
public string WebhookUrl { get; }
|
||||
public string WebhookToken { get; }
|
||||
public Instant Created { get; }
|
||||
public string UiTz { get; set; }
|
||||
public bool PingsEnabled { get; }
|
||||
|
|
@ -100,6 +102,10 @@ namespace PluralKit.Core
|
|||
|
||||
if (ctx == LookupContext.ByOwner)
|
||||
{
|
||||
// todo: should this be moved to a different JSON model?
|
||||
o.Add("webhook_url", system.WebhookUrl);
|
||||
o.Add("webhook_token", system.WebhookToken);
|
||||
|
||||
var p = new JObject();
|
||||
|
||||
p.Add("description_privacy", system.DescriptionPrivacy.ToJsonString());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue