Skip to content

Commit 6c28248

Browse files
authored
Update dashboard.html
Updated
1 parent 48413e8 commit 6c28248

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

dashboard.html

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,8 +180,6 @@ <h3 id="modal-title"></h3>
180180
</div>
181181

182182
<script>
183-
const AZURE_API_ENDPOINT = "https://eoagritool-cwfzfndaazauawex.canadacentral-01.azurewebsites.net";
184-
185183
document.addEventListener('DOMContentLoaded', () => {
186184
loadDashboardData();
187185
});
@@ -238,9 +236,9 @@ <h3 id="modal-title"></h3>
238236

239237
async function fetchRecommendationsData() {
240238
try {
241-
const response = await fetch(`${AZURE_API_ENDPOINT}/recommendations`);
239+
const response = await fetch("/api/recommendations");
242240
const data = await response.json();
243-
renderRecommendationCards(data.recommendations);
241+
renderRecommendationCards(data);
244242
} catch (error) {
245243
showError("Failed to load agricultural recommendations");
246244
document.getElementById('recommendations-card').innerHTML = `
@@ -294,8 +292,7 @@ <h3 class="card-title">🌱 Expert Recommendations</h3>
294292
const recElement = document.createElement('div');
295293
recElement.innerHTML = `
296294
<p><strong>${rec.title}</strong></p>
297-
<p>${rec.summary}</p>
298-
<button onclick="getRecommendationDetails(${index})">View Details</button>
295+
<p>${rec.details}</p>
299296
`;
300297
recommendationsCard.appendChild(recElement);
301298
});

0 commit comments

Comments
 (0)