diff options
Diffstat (limited to 'app/controllers/transcript.js')
-rw-r--r-- | app/controllers/transcript.js | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/app/controllers/transcript.js b/app/controllers/transcript.js index fb5de38..44d0155 100644 --- a/app/controllers/transcript.js +++ b/app/controllers/transcript.js @@ -4,15 +4,10 @@ 'use strict';
-var _ = require('lodash');
-
module.exports = function() {
var app = this.app,
core = this.core,
- middlewares = this.middlewares,
- models = this.models,
- Room = models.room,
- User = models.user;
+ middlewares = this.middlewares;
//
// Routes
@@ -20,10 +15,15 @@ module.exports = function() { app.get('/transcript', middlewares.requireLogin, function(req, res) {
var roomId = req.param('room');
core.rooms.get(roomId, function(err, room) {
- if (err || !room) {
- err && console.error(err)
+ if (err) {
+ console.error(err);
return res.sendStatus(404);
}
+
+ if (!room) {
+ return res.sendStatus(404);
+ }
+
res.render('transcript.html', {
room: {
id: roomId,
@@ -32,4 +32,4 @@ module.exports = function() { });
});
});
-}
+};
|