Spaces:
Sleeping
Sleeping
Update templates/home.html
Browse files- templates/home.html +4 -4
templates/home.html
CHANGED
|
@@ -849,7 +849,7 @@
|
|
| 849 |
if (response.ok) {
|
| 850 |
showToast('Payment link created successfully!', 'success');
|
| 851 |
setTimeout(() => {
|
| 852 |
-
|
| 853 |
}, 500);
|
| 854 |
} else {
|
| 855 |
showToast('Error creating payment link: ' + data.error);
|
|
@@ -943,7 +943,7 @@
|
|
| 943 |
if (response.ok) {
|
| 944 |
showToast('Claim link created successfully!', 'success');
|
| 945 |
setTimeout(() => {
|
| 946 |
-
|
| 947 |
}, 500);
|
| 948 |
} else {
|
| 949 |
showToast('Error creating claim link: ' + data.error);
|
|
@@ -990,9 +990,9 @@
|
|
| 990 |
|
| 991 |
if (response.ok && data.exists) {
|
| 992 |
if (data.type === 'payment') {
|
| 993 |
-
|
| 994 |
} else if (data.type === 'claim') {
|
| 995 |
-
|
| 996 |
}
|
| 997 |
} else {
|
| 998 |
showToast('Link not found. Please check the code and try again.');
|
|
|
|
| 849 |
if (response.ok) {
|
| 850 |
showToast('Payment link created successfully!', 'success');
|
| 851 |
setTimeout(() => {
|
| 852 |
+
top.location.href = data.payment_url;
|
| 853 |
}, 500);
|
| 854 |
} else {
|
| 855 |
showToast('Error creating payment link: ' + data.error);
|
|
|
|
| 943 |
if (response.ok) {
|
| 944 |
showToast('Claim link created successfully!', 'success');
|
| 945 |
setTimeout(() => {
|
| 946 |
+
top.location.href = data.claim_url;
|
| 947 |
}, 500);
|
| 948 |
} else {
|
| 949 |
showToast('Error creating claim link: ' + data.error);
|
|
|
|
| 990 |
|
| 991 |
if (response.ok && data.exists) {
|
| 992 |
if (data.type === 'payment') {
|
| 993 |
+
top.location.href = `/pay/${linkId}`;
|
| 994 |
} else if (data.type === 'claim') {
|
| 995 |
+
top.location.href = `/claim/${linkId}`;
|
| 996 |
}
|
| 997 |
} else {
|
| 998 |
showToast('Link not found. Please check the code and try again.');
|