mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat(webhooks): SUCCESSFUL_IMPORT event, better behaviour when creating entities
This commit is contained in:
parent
a05c3cfeed
commit
bc7e0df872
11 changed files with 73 additions and 27 deletions
|
|
@ -18,12 +18,14 @@ namespace PluralKit.Core
|
|||
private readonly IDatabase _db;
|
||||
private readonly ModelRepository _repo;
|
||||
private readonly ILogger _logger;
|
||||
private readonly DispatchService _dispatch;
|
||||
|
||||
public DataFileService(IDatabase db, ModelRepository repo, ILogger logger)
|
||||
public DataFileService(IDatabase db, ModelRepository repo, ILogger logger, DispatchService dispatch)
|
||||
{
|
||||
_db = db;
|
||||
_repo = repo;
|
||||
_logger = logger;
|
||||
_dispatch = dispatch;
|
||||
}
|
||||
|
||||
public async Task<JObject> ExportSystem(PKSystem system)
|
||||
|
|
@ -72,7 +74,7 @@ namespace PluralKit.Core
|
|||
await using var conn = await _db.Obtain();
|
||||
await using var tx = await conn.BeginTransactionAsync();
|
||||
|
||||
return await BulkImporter.PerformImport(conn, tx, _repo, _logger, userId, system, importFile, confirmFunc);
|
||||
return await BulkImporter.PerformImport(conn, tx, _repo, _logger, _dispatch, userId, system, importFile, confirmFunc);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue