[WIP] feat: scoped api keys

This commit is contained in:
Iris System 2025-08-17 02:47:01 -07:00
parent e7ee593a85
commit 06cb160f95
45 changed files with 1264 additions and 154 deletions

View file

@ -0,0 +1,24 @@
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;
}
}