prettier fixes #16

This commit is contained in:
Michael Dausmann
2023-10-24 21:18:03 +11:00
parent dc9d64ebf5
commit a7f8c37f99
56 changed files with 1706 additions and 935 deletions

View File

@@ -1,23 +1,31 @@
<script setup lang="ts">
import Stripe from 'stripe';
const config = useRuntimeConfig();
const stripe = new Stripe(config.stripeSecretKey, { apiVersion: '2022-11-15' });
const route = useRoute();
let customer: Stripe.Response<Stripe.Customer | Stripe.DeletedCustomer>
try{
const session = await stripe.checkout.sessions.retrieve(route?.query?.session_id as string);
customer = await stripe.customers.retrieve(session?.customer as string);
} catch(e) {
console.log(`Error ${e}`)
}
import Stripe from 'stripe';
const config = useRuntimeConfig();
const stripe = new Stripe(config.stripeSecretKey, {
apiVersion: '2022-11-15'
});
const route = useRoute();
let customer: Stripe.Response<Stripe.Customer | Stripe.DeletedCustomer>;
try {
const session = await stripe.checkout.sessions.retrieve(
route?.query?.session_id as string
);
customer = await stripe.customers.retrieve(session?.customer as string);
} catch (e) {
console.log(`Error ${e}`);
}
</script>
<template>
<div class="prose lg:prose-xl m-5">
<p>
<span v-if="customer && !customer.deleted">We appreciate your business {{customer.name}}!</span>
<span v-if="customer && customer.deleted">It appears your stripe customer information has been deleted!</span>
<span v-if="customer && !customer.deleted">
We appreciate your business {{ customer.name }}!
</span>
<span v-if="customer && customer.deleted">
It appears your stripe customer information has been deleted!
</span>
</p>
<p>Go to Your <NuxtLink to="/dashboard">Dashboard</NuxtLink></p>
</div>
</template>
</template>