mirror of
https://github.com/tavo-wasd-gh/conex-builder.git
synced 2025-06-07 12:13:30 -06:00
api
This commit is contained in:
parent
27c375144c
commit
4b0614fec7
2 changed files with 7 additions and 7 deletions
|
@ -271,7 +271,7 @@ function validateDirectoryLength(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(data => data.exists)
|
||||
.catch(error => {
|
||||
|
@ -339,7 +339,7 @@ function handleImageUpload() {
|
|||
loader.style.display = 'inline-block';
|
||||
imageIcon.style.display = 'none';
|
||||
|
||||
fetch('/api/upload', {
|
||||
fetch('https://api.conex.one/api/upload', {
|
||||
method: 'POST',
|
||||
body: formData,
|
||||
}).then(response => response.json()).then(data => {
|
||||
|
@ -491,7 +491,7 @@ async function editMode(dir) {
|
|||
|
||||
async function fetchAndStoreData(directoryName) {
|
||||
try {
|
||||
const response = await fetch(`/api/fetch/${encodeURIComponent(directoryName)}`);
|
||||
const response = await fetch(`https://api.conex.one/api/fetch/${encodeURIComponent(directoryName)}`);
|
||||
if (!response.ok) {
|
||||
throw new Error(`Failed to fetch data for directory: ${directoryName}`);
|
||||
}
|
||||
|
@ -514,7 +514,7 @@ function updateSiteRequest() {
|
|||
successElement = document.getElementById('update-success-message');
|
||||
errorElement = document.getElementById('update-error-message');
|
||||
|
||||
fetch('/api/update', {
|
||||
fetch('https://api.conex.one/api/update', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
@ -548,7 +548,7 @@ function updateSiteConfirm(code) {
|
|||
return;
|
||||
}
|
||||
|
||||
fetch('/api/confirm', {
|
||||
fetch('https://api.conex.one/api/confirm', {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
|
|
@ -10,7 +10,7 @@ paypal.Buttons({
|
|||
const requestData = {
|
||||
directory: savedData.directory,
|
||||
};
|
||||
const response = await fetch("/api/orders", {
|
||||
const response = await fetch("https://api.conex.one/api/orders", {
|
||||
method: "POST",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
@ -55,7 +55,7 @@ paypal.Buttons({
|
|||
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",
|
||||
headers: {
|
||||
"Content-Type": "application/json",
|
||||
|
|
Loading…
Reference in a new issue