async fixes (#128)

* refactor local metadata provider

* resolve async warnings

* more async fixes
This commit is contained in:
Jason Dove
2021-04-03 11:01:20 -05:00
committed by GitHub
parent 633586ddba
commit d4a2197dfa
38 changed files with 525 additions and 649 deletions
@@ -82,7 +82,7 @@ namespace ErsatzTV.Application.Channels.Commands
private async Task<Validation<BaseError, string>> ValidateNumber(UpdateChannel updateChannel)
{
Option<Channel> match = await _channelRepository.GetByNumber(updateChannel.Number);
int matchId = match.Map(c => c.Id).IfNone(updateChannel.ChannelId);
int matchId = await match.Map(c => c.Id).IfNoneAsync(updateChannel.ChannelId);
if (matchId == updateChannel.ChannelId)
{
if (Regex.IsMatch(updateChannel.Number, Channel.NumberValidator))