Removed need for users to be signed in to tip

This commit is contained in:
Karl Carriere
2025-01-06 15:18:33 -05:00
parent 6b0cc416a9
commit a9c015e82d
2 changed files with 5 additions and 11 deletions

View File

@@ -51,6 +51,8 @@ public class SendTipHandler(
{
Post("/api/tips");
Options(o => o.WithTags("Memberships"));
AllowAnonymous();
}
public override async Task HandleAsync(
@@ -68,8 +70,6 @@ public class SendTipHandler(
}
var checkoutSession = await stripeService.CreateTipCheckoutSessionAsync(
User.GetUserId(),
User.GetAlias()!,
creator.Id,
creator.Name,
req.Amount,
@@ -77,7 +77,8 @@ public class SendTipHandler(
req.Message,
creator.StripeAccountId,
req.CheckoutSuccessUrl,
req.CheckoutCancelledUrl);
req.CheckoutCancelledUrl
);
await SendAsync(
new SendTipResponse("Pending", checkoutSession.Url),