mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
24 lines
No EOL
430 B
C#
24 lines
No EOL
430 B
C#
using Newtonsoft.Json.Linq;
|
|
|
|
using SqlKata;
|
|
|
|
namespace PluralKit.Core;
|
|
|
|
public class ApiKeyPatch: PatchObject
|
|
{
|
|
public Partial<string> Name { get; set; }
|
|
|
|
public override Query Apply(Query q) => q.ApplyPatch(wrapper => wrapper
|
|
.With("name", Name)
|
|
);
|
|
|
|
public JObject ToJson()
|
|
{
|
|
var o = new JObject();
|
|
|
|
if (Name.IsPresent)
|
|
o.Add("name", Name.Value);
|
|
|
|
return o;
|
|
}
|
|
} |