From e4fe87c0a5c3e441b533cdb4e0e85b683e244d3b Mon Sep 17 00:00:00 2001 From: Julie Lala Date: Tue, 30 Sep 2014 02:42:42 -0400 Subject: untitled room --- views/staff/_projects.ejs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'views') diff --git a/views/staff/_projects.ejs b/views/staff/_projects.ejs index 9e37a6c..0fdfcf5 100644 --- a/views/staff/_projects.ejs +++ b/views/staff/_projects.ejs @@ -8,11 +8,11 @@ [view] [edit] - [[ if (project.user) { ]] + [[ if (project.user) { ]] [[- project.user.username ]] - [[ } ]] + [[- project.date ]] -- cgit v1.2.3-70-g09d2 From 746dc328ab759d95935177834525b4a1dfccffff Mon Sep 17 00:00:00 2001 From: Jules Laplace Date: Tue, 30 Sep 2014 02:53:34 -0400 Subject: forgot $in --- server/lib/views/staff.js | 6 +++--- views/staff/_projects.ejs | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'views') diff --git a/server/lib/views/staff.js b/server/lib/views/staff.js index ffacee2..41877c8 100644 --- a/server/lib/views/staff.js +++ b/server/lib/views/staff.js @@ -143,14 +143,14 @@ var staff = module.exports = { }, ensureObjectsUsers: function(objects, next){ - if (! objects) { return next () } + if (! objects) { return next () } var dedupe = {}, user_ids objects.forEach(function(obj){ dedupe[ obj.user_id ] = dedupe[ obj.user_id ] || [] dedupe[ obj.user_id ].push(obj) }) user_ids = _.keys(dedupe) - User.find({ _id: user_ids }) + User.find({ _id: { $in: user_ids } }) .select(staff.fields.user) .exec(function (err, users) { if (! users) { return next () } @@ -527,4 +527,4 @@ var staff = module.exports = { }, } -} \ No newline at end of file +} diff --git a/views/staff/_projects.ejs b/views/staff/_projects.ejs index 0fdfcf5..2c3eb9f 100644 --- a/views/staff/_projects.ejs +++ b/views/staff/_projects.ejs @@ -7,11 +7,10 @@ [view] [edit] + [api] - [[ if (project.user) { ]] [[- project.user.username ]] - [[ } ]] [[- project.date ]] -- cgit v1.2.3-70-g09d2