Adding Log Entry

This commit is contained in:
Brian McGonagill 2026-02-08 11:03:21 -06:00
parent e8649038ad
commit b5bab7b2a6
6 changed files with 230 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import { UserInfo } from "../imports/api/userInfo";
import { Roels } from "meteor/roles";
import { Workouts } from "../imports/api/workouts";
import { WorkoutLog } from "../imports/api/workoutLog";
import { LogEntry } from "../imports/api/logEntry";
Meteor.publish("SystemConfig", function() {
try {
@ -56,3 +57,13 @@ Meteor.publish("myWorkoutLog", function () {
console.log(" ERROR in pulling workout routines: " + error);
}
});
Meteor.publish("myLogEntries", function (routineId) {
try {
if (this.userId) {
return LogEntry.find({ "addedBy": this.userId, "routineId": routineId });
}
} catch(error) {
console.log(" ERROR in pulling workout routines: " + error);
}
});