diff --git a/MindShift-Windows/src/api.js b/MindShift-Windows/src/api.js index ac7e917..b2ed79f 100644 --- a/MindShift-Windows/src/api.js +++ b/MindShift-Windows/src/api.js @@ -135,11 +135,21 @@ export const gratitudeAPI = { // Progress API export const progressAPI = { async getProgressStats() { - return await apiCall('/progress/stats'); + return await apiCall('/dashboard/stats'); }, - async getProgressHistory() { - return await apiCall('/progress/history'); + async getProgressHistory(days = 30) { + return await apiCall(`/progress?days=${days}`); + } +}; + +// Exercise API +export const exerciseAPI = { + async logSession(type, duration) { + return await apiCall('/exercises', { + method: 'POST', + body: JSON.stringify({ exerciseType: type, duration }) + }); } }; diff --git a/MindShift-Windows/src/app.js b/MindShift-Windows/src/app.js index 3d7c55f..d4a5952 100644 --- a/MindShift-Windows/src/app.js +++ b/MindShift-Windows/src/app.js @@ -1,4 +1,4 @@ -import { authAPI, moodAPI, thoughtAPI, gratitudeAPI, progressAPI, notificationAPI, isAuthenticated, initializeAPI } from './api.js'; +import { authAPI, moodAPI, thoughtAPI, gratitudeAPI, progressAPI, notificationAPI, exerciseAPI, isAuthenticated, initializeAPI } from './api.js'; // Sound Manager using Web Audio API class SoundManager { @@ -171,7 +171,7 @@ function showLoginModal() { loginModal.innerHTML = `