Fix 404s: revert premature .cfm → .php endpoint rename in portal/KDS/HUD
Another tab doing the PHP migration renamed all API endpoint references from .cfm to .php, but the PHP endpoints aren't deployed yet. Reverted all references back to .cfm so the wizard and portal work again. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5985a3732f
commit
14f0662ba0
1 changed files with 12 additions and 12 deletions
|
|
@ -1401,7 +1401,7 @@
|
||||||
`);
|
`);
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${config.apiBaseUrl}/setup/analyzeMenuUrl.php`, {
|
const response = await fetch(`${config.apiBaseUrl}/setup/analyzeMenuUrl.cfm`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ url })
|
body: JSON.stringify({ url })
|
||||||
|
|
@ -1493,8 +1493,8 @@
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append('zipFile', file);
|
formData.append('zipFile', file);
|
||||||
|
|
||||||
console.log('Uploading ZIP to:', `${config.apiBaseUrl}/setup/uploadSavedPage.php`);
|
console.log('Uploading ZIP to:', `${config.apiBaseUrl}/setup/uploadSavedPage.cfm`);
|
||||||
const uploadResponse = await fetch(`${config.apiBaseUrl}/setup/uploadSavedPage.php`, {
|
const uploadResponse = await fetch(`${config.apiBaseUrl}/setup/uploadSavedPage.cfm`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: formData
|
body: formData
|
||||||
});
|
});
|
||||||
|
|
@ -1533,7 +1533,7 @@
|
||||||
`);
|
`);
|
||||||
|
|
||||||
// Now analyze the extracted URL with Playwright
|
// Now analyze the extracted URL with Playwright
|
||||||
const response = await fetch(`${config.apiBaseUrl}/setup/analyzeMenuUrl.php`, {
|
const response = await fetch(`${config.apiBaseUrl}/setup/analyzeMenuUrl.cfm`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ url: uploadResult.URL })
|
body: JSON.stringify({ url: uploadResult.URL })
|
||||||
|
|
@ -1549,7 +1549,7 @@
|
||||||
const htmlContent = await file.text();
|
const htmlContent = await file.text();
|
||||||
console.log('Sending HTML content, length:', htmlContent.length);
|
console.log('Sending HTML content, length:', htmlContent.length);
|
||||||
|
|
||||||
const response = await fetch(`${config.apiBaseUrl}/setup/analyzeMenuUrl.php`, {
|
const response = await fetch(`${config.apiBaseUrl}/setup/analyzeMenuUrl.cfm`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ html: htmlContent })
|
body: JSON.stringify({ html: htmlContent })
|
||||||
|
|
@ -1813,7 +1813,7 @@
|
||||||
});
|
});
|
||||||
formData.append('businessId', config.businessId);
|
formData.append('businessId', config.businessId);
|
||||||
|
|
||||||
const response = await fetch(`${config.apiBaseUrl}/setup/analyzeMenuImages.php`, {
|
const response = await fetch(`${config.apiBaseUrl}/setup/analyzeMenuImages.cfm`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: formData
|
body: formData
|
||||||
});
|
});
|
||||||
|
|
@ -2000,7 +2000,7 @@
|
||||||
// Check for duplicate businesses before creating a new one
|
// Check for duplicate businesses before creating a new one
|
||||||
async function checkForDuplicateBusiness(biz) {
|
async function checkForDuplicateBusiness(biz) {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${config.apiBaseUrl}/setup/checkDuplicate.php`, {
|
const response = await fetch(`${config.apiBaseUrl}/setup/checkDuplicate.cfm`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
|
|
@ -2271,7 +2271,7 @@
|
||||||
if (!taxInput) return;
|
if (!taxInput) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const resp = await fetch(`/api/setup/lookupTaxRate.php?zip=${encodeURIComponent(zipCode)}`);
|
const resp = await fetch(`/api/setup/lookupTaxRate.cfm?zip=${encodeURIComponent(zipCode)}`);
|
||||||
const data = await resp.json();
|
const data = await resp.json();
|
||||||
|
|
||||||
if (data.OK && data.taxRate > 0) {
|
if (data.OK && data.taxRate > 0) {
|
||||||
|
|
@ -3182,7 +3182,7 @@
|
||||||
saveBtn.disabled = true;
|
saveBtn.disabled = true;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${config.apiBaseUrl}/setup/saveWizard.php`, {
|
const response = await fetch(`${config.apiBaseUrl}/setup/saveWizard.cfm`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json'
|
'Content-Type': 'application/json'
|
||||||
|
|
@ -3243,7 +3243,7 @@
|
||||||
formData.append('BusinessID', finalBusinessId);
|
formData.append('BusinessID', finalBusinessId);
|
||||||
formData.append('header', config.headerImageFile);
|
formData.append('header', config.headerImageFile);
|
||||||
|
|
||||||
const headerResp = await fetch(`${config.apiBaseUrl}/menu/uploadHeader.php`, {
|
const headerResp = await fetch(`${config.apiBaseUrl}/menu/uploadHeader.cfm`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: formData
|
body: formData
|
||||||
});
|
});
|
||||||
|
|
@ -3292,7 +3292,7 @@
|
||||||
formData.append('ItemID', dbItemId);
|
formData.append('ItemID', dbItemId);
|
||||||
formData.append('photo', file);
|
formData.append('photo', file);
|
||||||
|
|
||||||
const imgResp = await fetch(`${config.apiBaseUrl}/menu/uploadItemPhoto.php`, {
|
const imgResp = await fetch(`${config.apiBaseUrl}/menu/uploadItemPhoto.cfm`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
body: formData
|
body: formData
|
||||||
});
|
});
|
||||||
|
|
@ -3512,7 +3512,7 @@
|
||||||
|
|
||||||
async function loadBusinessInfo() {
|
async function loadBusinessInfo() {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(`${config.apiBaseUrl}/businesses/get.php`, {
|
const response = await fetch(`${config.apiBaseUrl}/businesses/get.cfm`, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ BusinessID: config.businessId })
|
body: JSON.stringify({ BusinessID: config.businessId })
|
||||||
|
|
|
||||||
Reference in a new issue