From 7735b6cfdbed24dbc924794abfb461c409b8c0ee Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Tue, 6 Sep 2016 18:57:55 -0400 Subject: [PATCH] Added default avatar and banner to createProfile, and small bug --- hourglass/server/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hourglass/server/main.js b/hourglass/server/main.js index 7e1c013..7f8f298 100644 --- a/hourglass/server/main.js +++ b/hourglass/server/main.js @@ -85,7 +85,7 @@ Meteor.publish('work', function() { return work.find({ // Only return work of enrolled classes class: { - $in: userprofile.profile.classes.concat(Meteor.userId()) + $in: userprofile.profile.classes.concat(this.userId) } }); } else { @@ -484,6 +484,8 @@ Meteor.methods({ var current = Meteor.users.findOne({ _id: userId }).profile; + current.banner = "/Banners/defaultcover.jpg"; + current.avatar = "/Avatars/" + (Math.floor(Math.random() * 10) + 1).toString() + ".png"; current.classes = []; current.preferences = { "theme": "light",