Files
documenso/packages/lib/stripe/fetchers/get-subscription.ts
2023-05-05 20:08:18 +10:00

15 lines
353 B
TypeScript

import { GetSubscriptionResponse } from "../handlers/get-subscription";
export const fetchSubscription = async () => {
const response = await fetch("/api/stripe/subscription", {
method: "GET",
headers: {
"Content-Type": "application/json",
},
});
const json: GetSubscriptionResponse = await response.json();
return json;
};