Support /meeting path alongside /survey and root paths

This commit is contained in:
pongpon pitisuk
2026-09-17 15:32:01 +07:00
parent e0ed82fa74
commit fb505c53d5
5 changed files with 11 additions and 8 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ async function initSurvey() {
}
try {
const basePath = window.location.pathname.includes('/survey') ? '/survey' : '';
const basePath = getAppBasePath();
const data = await fetch(`${basePath}/api/surveys.php?action=getByLink&link=${encodeURIComponent(link)}`).then(r => r.json());
if (data.error) {
@@ -247,7 +247,7 @@ async function submitSurveyResponse(e) {
const params = new URLSearchParams(window.location.search);
try {
const basePath = window.location.pathname.includes('/survey') ? '/survey' : '';
const basePath = getAppBasePath();
const res = await fetch(`${basePath}/api/responses.php?action=submit`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },