Skip to content

Commit

Permalink
Merge pull request #32 from csci5117s24/fix
Browse files Browse the repository at this point in the history
fix: minor error
  • Loading branch information
May-Wang-666 authored May 6, 2024
2 parents 51c6213 + 40c4175 commit 0529529
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/api/src/biz/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ async function AddCalorieLog(userId, exerciseId) {
async function GetCalorieLogs(userId, dateStr) {
const startTime = new Date(dateStr);
let endTime = new Date(dateStr);
endTime.setHours(endTime.getHours() + 24);
endTime.setDate(endTime.getDate()+1);
const logs = await FindFromMongo(collectionCalorieLog, {userId: userId, createdAt: {$gte: startTime, $lt: endTime}});
return logs;
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/routes/WorkoutList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ function WorkoutList({ fetchTrigger }) {
const updatedWorkout = {
title: editFormData.title,
description: editFormData.description,
calories: editFormData.calories
calories: parseInt(editFormData.calories)
};

try {
Expand Down

0 comments on commit 0529529

Please sign in to comment.