Skip to content

Commit

Permalink
Fix - Correction de la serialization de la commande de créationd 'un …
Browse files Browse the repository at this point in the history
…payout
  • Loading branch information
noelmugnier committed Nov 30, 2020
1 parent 05a83dd commit 1a4e097
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sheaft.Application.Commands/Payout/CreatePayoutCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public CreatePayoutCommand(RequestUser requestUser) : base(requestUser)
}

public Guid ProducerId { get; set; }
public IEnumerable<Guid> TransferIds { get; set; }
public List<Guid> TransferIds { get; set; }
}
}
4 changes: 2 additions & 2 deletions Sheaft.Application.Handlers/Commands/PayoutCommandsHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ private async Task<IEnumerable<Guid>> GetNextPayoutIdsAsync(int skip, int take,
.ToListAsync(token);
}

private async Task<IEnumerable<KeyValuePair<Guid, IEnumerable<Guid>>>> GetNextNewPayoutIdsAsync(int skip, int take, CancellationToken token)
private async Task<IEnumerable<KeyValuePair<Guid, List<Guid>>>> GetNextNewPayoutIdsAsync(int skip, int take, CancellationToken token)
{
var producersTransfers = await _context.Transfers
.Get(t => t.Status == TransactionStatus.Succeeded
Expand All @@ -236,7 +236,7 @@ private async Task<IEnumerable<KeyValuePair<Guid, IEnumerable<Guid>>>> GetNextNe
.ToListAsync(token);

var groupedProducers = producersTransfers.GroupBy(t => t.ProducerId);
return groupedProducers.Select(c => new KeyValuePair<Guid, IEnumerable<Guid>>(c.Key, c.Select(t => t.TransferId)));
return groupedProducers.Select(c => new KeyValuePair<Guid, List<Guid>>(c.Key, c.Select(t => t.TransferId)?.ToList()));
}
}
}

0 comments on commit 1a4e097

Please sign in to comment.