mirror of
https://github.com/KevinMidboe/planetposen.git
synced 2025-12-08 20:38:56 +00:00
Check if localhost before making fetch request.
This commit is contained in:
@@ -58,7 +58,11 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
makeIntent() {
|
makeIntent() {
|
||||||
fetch('/api/stripe/create-payment-intent', {
|
let url = '/api/stripe/create-payment-intent';
|
||||||
|
if (window.location.href.includes('localhost'))
|
||||||
|
url = 'http://localhost:30010'.concat(url)
|
||||||
|
|
||||||
|
fetch(url, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
|||||||
Reference in New Issue
Block a user