@פלמנמוני כתב בבירור | הפעלת סקריפט:
@ציון-הלוא-תשאלי כתב בבירור | הפעלת סקריפט:
לא הבנתי איפה לכתוב את זה?
תכתוב פונקציה בקוד
function doGet(e) {
if (e.parameter && e.parameter.doPost) {
var functionName = e.parameter.doPost;
if (typeof this[functionName] === 'function') {
try {
var result = this[functionName]();
return ContentService.createTextOutput(result);
} catch (error) {
return ContentService.createTextOutput("Error: " + error.toString());
}
}
}
return ContentService.createTextOutput("Function not found or parameter missing.");
}
תודה