Fix formatting

This commit is contained in:
olaven 2025-05-20 21:53:10 +02:00
parent 613be81055
commit 2d68e927eb
2 changed files with 7 additions and 3 deletions

View File

@ -93,9 +93,12 @@ export const createAgreement = async function (email: string) {
}
};
export const getAgreement = async function (agreementId: string): Promise<{
export const getAgreement = async function (agreementId: string): Promise<
| {
status: "PENDING" | "ACTIVE" | "STOPPED" | "EXPIRED";
}> {
}
| Error
> {
const token = await getAccessToken();
const response = await fetch(
`${config.baseUrl}/recurring/v3/agreements/${agreementId}`,

View File

@ -27,6 +27,7 @@ export const handler = async function (req: Request): Promise<Response> {
if (
agreementInVipps &&
!(agreementInVipps instanceof Error) &&
agreementInVipps.status !== "ACTIVE" &&
hasActiveAgreement
) {