feat: stripe handlers and fetchers

This commit is contained in:
Mythie
2023-05-05 20:08:18 +10:00
parent ed3e4d22ef
commit 900b816ae0
6 changed files with 263 additions and 1 deletions

View File

@ -0,0 +1,14 @@
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;
};