feat(webhooks): init, add service/models, add JSON to patch objects

This commit is contained in:
spiral 2021-11-02 06:08:17 -04:00
parent 08c5b78cc2
commit 71aec0d419
No known key found for this signature in database
GPG key ID: A6059F0CA0E1BD31
14 changed files with 551 additions and 2 deletions

View file

@ -100,6 +100,9 @@ namespace PluralKit.Core
return _db.QueryStream<PKSwitch>(query);
}
public Task<PKSwitch?> GetSwitch(SwitchId id)
=> _db.QueryFirst<PKSwitch?>(new Query("switches").Where("id", id));
public Task<PKSwitch> GetSwitchByUuid(Guid uuid)
{
var query = new Query("switches").Where("uuid", uuid);