Add disabling autoproxy per-account

This commit is contained in:
spiral
2020-11-20 18:34:08 -05:00
parent 41247c68a6
commit 37294b68da
8 changed files with 98 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
using Dapper;
namespace PluralKit.Core
{
public partial class ModelRepository
{
public async Task UpdateAccount(IPKConnection conn, ulong id, AccountPatch patch)
{
_logger.Information("Updated account {accountId}: {@AccountPatch}", id, patch);
var (query, pms) = patch.Apply(UpdateQueryBuilder.Update("accounts", "uid = @uid"))
.WithConstant("uid", id)
.Build();
await conn.ExecuteAsync(query, pms);
}
}
}