diff options
| -rw-r--r-- | server/lib/views/staff.js | 6 | ||||
| -rw-r--r-- | views/staff/_projects.ejs | 3 |
2 files changed, 4 insertions, 5 deletions
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 @@ <td class="editLinks"> <a href="/project/[[- project.slug ]]">[view]</a> <a href="/project/[[- project.slug ]]/edit">[edit]</a> + <a href="/api/rooms/[[- project.slug ]]">[api]</a> </td> <td> - [[ if (project.user) { ]] <a href="/staff/users/[[- project.user.username ]]">[[- project.user.username ]]</a> - [[ } ]] </td> <td> [[- project.date ]] |
