Skip to content

Commit

Permalink
Validate CustomerReviewsQuery.StoreId
Browse files Browse the repository at this point in the history
  • Loading branch information
artem-dudarev committed Oct 16, 2024
1 parent c50d5c4 commit 4cc4ee3
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ protected override async Task HandleRequirementAsync(AuthorizationHandlerContext
case CreateCustomerReviewCommand command:
result = isAuthenticated && command.UserId == currentUserId && await IsStoreAvailable(command.StoreId, currentUserId);
break;
case CustomerReviewsQuery:
result = true;
case CustomerReviewsQuery query:
result = await IsStoreAvailable(query.StoreId, currentUserId);
break;
case CreateReviewCommand command:
result = isAuthenticated && await IsStoreAvailable(command.StoreId, currentUserId);
Expand Down

0 comments on commit 4cc4ee3

Please sign in to comment.