Adding Log Entry
This commit is contained in:
parent
e8649038ad
commit
b5bab7b2a6
6 changed files with 230 additions and 0 deletions
|
|
@ -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);
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue