public async Task CheckValidityAsync(CallContext callContext) { QueryValidationHelper.CheckNotReservedGuid(CurrentUserId); QueryValidationHelper.CheckNotReservedGuid(DeckId); QueryValidationHelper.CheckContainsNoReservedGuid(CardIds); await QueryValidationHelper.CheckUserIsOwnerOfDeckAsync(callContext.DbContext, CurrentUserId, DeckId); }
public async Task CheckValidityAsync(CallContext callContext) { QueryValidationHelper.CheckNotReservedGuid(CurrentUserId); QueryValidationHelper.CheckNotReservedGuid(DeckId); QueryValidationHelper.CheckContainsNoReservedGuid(ExcludedCardIds); QueryValidationHelper.CheckContainsNoReservedGuid(ExcludedTagIds); if (CardsToDownload < 1 || CardsToDownload > 100) { throw new RequestInputException($"Invalid CardsToDownload: {CardsToDownload}"); } await QueryValidationHelper.CheckUserIsOwnerOfDeckAsync(callContext.DbContext, CurrentUserId, DeckId); }