mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Fixed addbulkasync method
This commit is contained in:
@@ -27,14 +27,12 @@ public class CurrencyService : ICurrencyService, INService
|
|||||||
{
|
{
|
||||||
if (type == CurrencyType.Default)
|
if (type == CurrencyType.Default)
|
||||||
{
|
{
|
||||||
await using var ctx = _db.GetDbContext();
|
|
||||||
foreach (var userId in userIds)
|
foreach (var userId in userIds)
|
||||||
{
|
{
|
||||||
var wallet = new DefaultWallet(userId, ctx);
|
await using var wallet = await GetWalletAsync(userId);
|
||||||
await wallet.Add(amount, txData);
|
await wallet.Add(amount, txData);
|
||||||
}
|
}
|
||||||
|
|
||||||
await ctx.SaveChangesAsync();
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user