fix: proper cancellation handling

This commit is contained in:
2026-01-28 21:13:15 +00:00
parent 65964d64f6
commit d4cc50f289
12 changed files with 359 additions and 20 deletions

View File

@@ -3,6 +3,7 @@ import { z } from "zod";
import {
ApiErrorSchema,
AuthResponseSchema,
CancelSubscriptionResponseSchema,
CreateCheckoutSessionRequestSchema,
CreateCheckoutSessionResponseSchema,
CreatePortalSessionResponseSchema,
@@ -628,6 +629,17 @@ export const apiContract = c.router({
},
headers: csrfHeaderSchema,
},
subscriptionCancel: {
method: "POST",
path: "/subscription/cancel",
body: emptyBodySchema,
responses: {
200: CancelSubscriptionResponseSchema,
404: ApiErrorSchema,
500: ApiErrorSchema,
},
headers: csrfHeaderSchema,
},
subscriptionGet: {
method: "GET",
path: "/subscription/get",