Skip to content

Commit

Permalink
migration to SvelteKit 2
Browse files Browse the repository at this point in the history
  • Loading branch information
joshnuss committed Apr 3, 2024
1 parent 97c07b4 commit f02b9e2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 16 deletions.
13 changes: 7 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@
"@stripe/stripe-js": "^2.1.11"
},
"devDependencies": {
"@sveltejs/adapter-vercel": "^1.0.6",
"@sveltejs/kit": "^1.27.6",
"@sveltejs/adapter-vercel": "^4.0.0",
"@sveltejs/kit": "^2.0.0",
"@sveltejs/package": "^2.0.0",
"@sveltejs/vite-plugin-svelte": "^3.0.0",
"@vitejs/plugin-basic-ssl": "^0.1.2",
"dotenv-cli": "^5.1.0",
"eslint": "^8.53.0",
"eslint-config-prettier": "^8.10.0",
"eslint-plugin-jsdoc": "^38.1.6",
"eslint-plugin-svelte3": "^3.4.1",
"eslint-plugin-svelte3": "^4.0.0",
"mdsvex": "^0.10.6",
"prettier": "~2.6.2",
"prettier-plugin-svelte": "^2.10.1",
Expand All @@ -34,10 +35,10 @@
"rehype-slug": "^5.1.0",
"semantic-release": "22.0.7",
"stripe": "^8.222.0",
"svelte": "^3.59.2",
"svelte": "^4.0.0",
"svelte2tsx": "^0.5.23",
"typescript": "^4.9.5",
"vite": "^4.5.2"
"typescript": "^5.0.0",
"vite": "^5.0.0"
},
"type": "module",
"repository": {
Expand Down
4 changes: 2 additions & 2 deletions src/routes/examples/afterpay-clearpay/return/+server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export async function GET(req) {
if (paymentIntent.client_secret !== clientSecret) throw new Error('Client secret mismatch')

if (paymentIntent.status === 'succeeded') {
throw redirect(302, '/examples/afterpay-clearpay/thanks')
redirect(302, '/examples/afterpay-clearpay/thanks');
}

throw redirect(302, '/examples/afterpay-clearpay?error=true')
redirect(302, '/examples/afterpay-clearpay?error=true');
}
4 changes: 2 additions & 2 deletions src/routes/examples/alipay/return/+server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export async function GET(req) {
if (paymentIntent.client_secret !== clientSecret) throw new Error('Client secret mismatch')

if (paymentIntent.status === 'succeeded') {
throw redirect(302, '/examples/alipay/thanks')
redirect(302, '/examples/alipay/thanks');
}

throw redirect(302, '/examples/alipay?error=true')
redirect(302, '/examples/alipay?error=true');
}
4 changes: 2 additions & 2 deletions src/routes/examples/ideal/return/+server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export async function GET(req) {
if (paymentIntent.client_secret !== clientSecret) throw new Error('Client secret mismatch')

if (paymentIntent.status === 'succeeded') {
throw redirect(302, '/examples/ideal/thanks')
redirect(302, '/examples/ideal/thanks');
}

throw redirect(302, '/examples/ideal?error=true')
redirect(302, '/examples/ideal?error=true');
}
4 changes: 2 additions & 2 deletions src/routes/examples/klarna/return/+server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export async function GET(req) {
if (paymentIntent.client_secret !== clientSecret) throw new Error('Client secret mismatch')

if (paymentIntent.status === 'succeeded') {
throw redirect(302, '/examples/klarna/thanks')
redirect(302, '/examples/klarna/thanks');
}

throw redirect(302, '/examples/klarna?error=true')
redirect(302, '/examples/klarna?error=true');
}
4 changes: 2 additions & 2 deletions src/routes/examples/sofort/return/+server.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export async function GET(req) {
if (paymentIntent.client_secret !== clientSecret) throw new Error('Client secret mismatch')

if (paymentIntent.status === 'processing') {
throw redirect(302, '/examples/sofort/thanks')
redirect(302, '/examples/sofort/thanks');
}

throw redirect(302, '/examples/sofort?error=true')
redirect(302, '/examples/sofort?error=true');
}

0 comments on commit f02b9e2

Please sign in to comment.