mirror of
https://github.com/documenso/documenso.git
synced 2025-11-16 01:32:06 +10:00
feat: stripe handlers and fetchers
This commit is contained in:
14
packages/lib/stripe/fetchers/get-subscription.ts
Normal file
14
packages/lib/stripe/fetchers/get-subscription.ts
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user