This commit is contained in:
tavo 2024-09-22 10:20:55 -06:00
parent 27c375144c
commit 4b0614fec7
2 changed files with 7 additions and 7 deletions

View file

@ -271,7 +271,7 @@ function validateDirectoryLength(directory) {
} }
function checkDirectoryExists(directory) { function checkDirectoryExists(directory) {
return fetch(`/api/directory/${encodeURIComponent(directory)}`) return fetch(`https://api.conex.one/api/directory/${encodeURIComponent(directory)}`)
.then(response => response.json()) .then(response => response.json())
.then(data => data.exists) .then(data => data.exists)
.catch(error => { .catch(error => {
@ -339,7 +339,7 @@ function handleImageUpload() {
loader.style.display = 'inline-block'; loader.style.display = 'inline-block';
imageIcon.style.display = 'none'; imageIcon.style.display = 'none';
fetch('/api/upload', { fetch('https://api.conex.one/api/upload', {
method: 'POST', method: 'POST',
body: formData, body: formData,
}).then(response => response.json()).then(data => { }).then(response => response.json()).then(data => {
@ -491,7 +491,7 @@ async function editMode(dir) {
async function fetchAndStoreData(directoryName) { async function fetchAndStoreData(directoryName) {
try { try {
const response = await fetch(`/api/fetch/${encodeURIComponent(directoryName)}`); const response = await fetch(`https://api.conex.one/api/fetch/${encodeURIComponent(directoryName)}`);
if (!response.ok) { if (!response.ok) {
throw new Error(`Failed to fetch data for directory: ${directoryName}`); throw new Error(`Failed to fetch data for directory: ${directoryName}`);
} }
@ -514,7 +514,7 @@ function updateSiteRequest() {
successElement = document.getElementById('update-success-message'); successElement = document.getElementById('update-success-message');
errorElement = document.getElementById('update-error-message'); errorElement = document.getElementById('update-error-message');
fetch('/api/update', { fetch('https://api.conex.one/api/update', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',
@ -548,7 +548,7 @@ function updateSiteConfirm(code) {
return; return;
} }
fetch('/api/confirm', { fetch('https://api.conex.one/api/confirm', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',

View file

@ -10,7 +10,7 @@ paypal.Buttons({
const requestData = { const requestData = {
directory: savedData.directory, directory: savedData.directory,
}; };
const response = await fetch("/api/orders", { const response = await fetch("https://api.conex.one/api/orders", {
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",
@ -55,7 +55,7 @@ paypal.Buttons({
editor_data: savedData.editor_data editor_data: savedData.editor_data
}; };
const response = await fetch(`/api/orders/${data.orderID}/capture`, { const response = await fetch(`https://api.conex.one/api/orders/${data.orderID}/capture`, {
method: "POST", method: "POST",
headers: { headers: {
"Content-Type": "application/json", "Content-Type": "application/json",