From f60017ee7dcde2db90cb92eff9adf3361ff647d3 Mon Sep 17 00:00:00 2001 From: pjaudiomv <34245618+pjaudiomv@users.noreply.github.com> Date: Tue, 6 Feb 2024 18:18:34 -0500 Subject: [PATCH] Auto do Jason P things. (#5) --- assets/js/main.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/assets/js/main.js b/assets/js/main.js index b741296..08c7a2a 100644 --- a/assets/js/main.js +++ b/assets/js/main.js @@ -238,16 +238,18 @@ class MeetingDataProcessor { // start the export process exportData(query) { - if (!query.includes("/client_interface/jsonp")) { + const updatedQuery = query.replace( + "/client_interface/json/", + "/client_interface/jsonp/" + ); + if (!updatedQuery.includes("/client_interface/jsonp")) { MeetingDataProcessor.hideLinks(); - MeetingDataProcessor.displayError( - "Invalid BMLT query URL, must use jsonp endpoint." - ); + MeetingDataProcessor.displayError("Invalid BMLT query URL."); return; } const isCSV = true; - const isKML = query.includes("GetSearchResults"); - this.fetchMeetings(query, isCSV, isKML).catch((error) => + const isKML = updatedQuery.includes("GetSearchResults"); + this.fetchMeetings(updatedQuery, isCSV, isKML).catch((error) => console.error("Error fetching meetings:", error) ); }