mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 21:16:49 +00:00
feat: import/export system config
This commit is contained in:
parent
9097142718
commit
cc4e659cec
6 changed files with 30 additions and 9 deletions
|
|
@ -80,7 +80,12 @@ public partial class ModelRepository
|
|||
var system = await _db.QueryFirst<PKSystem>(conn, query, "returning *");
|
||||
_logger.Information("Created {SystemId}", system.Id);
|
||||
|
||||
await _db.Execute(conn => conn.QueryAsync("insert into config (system) values (@system)", new { system = system.Id }));
|
||||
var (q, pms) = ("insert into config (system) values (@system)", new { system = system.Id });
|
||||
|
||||
if (conn == null)
|
||||
await _db.Execute(conn => conn.QueryAsync(q, pms));
|
||||
else
|
||||
await conn.QueryAsync(q, pms);
|
||||
|
||||
// no dispatch call here - system was just created, we don't have a webhook URL
|
||||
return system;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue