Commit d6a5e934 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Add missing semicolons to comments-server-side.

parent 706bc7be
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -34,7 +34,7 @@ ForumUser.prototype = {
                    return;
                }

                var user = self.getUserFromResult(results[0])
                var user = self.getUserFromResult(results[0]);

                callback(null, user);
            }
@@ -50,7 +50,7 @@ ForumUser.prototype = {
            userName: user.username,
            userId: user.userid,
            mod: _.include(user.membergroupids, 7)
        }
        };
    },

    checkPassword: function(password, salt, saltedPassword) {
+5 −5
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
config = require('./config');
mongoose = require('mongoose');
require('./database');
require('express-namespace')
require('express-namespace');

var mysql = require('mysql'),
    client = mysql.createClient({
@@ -165,7 +165,7 @@ app.namespace('/auth/:sdk/:version', function(){
            } else {
                return;
            }
        }
        };

        var reduce = function(key, values) {
            var i = 0, total = 0;
@@ -175,7 +175,7 @@ app.namespace('/auth/:sdk/:version', function(){
            }

            return total;
        }
        };

        mongoose.connection.db.executeDbCommand({
            mapreduce: 'comments',
@@ -190,7 +190,7 @@ app.namespace('/auth/:sdk/:version', function(){
        }, function(err, dbres) {
            mongoose.connection.db.collection('commentCounts', function(err, collection) {
                collection.find({}).toArray(function(err, comments) {
                    res.send(comments)
                    res.send(comments);
                });
            });
        });
@@ -227,7 +227,7 @@ app.namespace('/auth/:sdk/:version', function(){
            emaiHash: crypto.createHash('md5').update(req.session.user.email).digest("hex"),
            sdk: req.params.sdk,
            version: req.params.version
        })
        });

        comment.save(function(err, response) {
            res.json({ success: true, id: response._id, action: req.body.action });
+7 −7
Original line number Diff line number Diff line
@@ -23,14 +23,14 @@ exports.sanitize = function(content, opts) {
            } else {
                return '';
            }
        }
        };
    }

    sanitized_output = sanitizer.sanitize(markdowned, urlFunc);
    sanitized_output = sanitized_output.replace(/'/g, ''');

    return sanitized_output;
}
};

exports.formatComments = function(comments, req) {

@@ -47,8 +47,8 @@ exports.formatComments = function(comments, req) {
        }

        return comment;
    })
}
    });
};

exports.vote = function(req, res, comment) {

@@ -93,7 +93,7 @@ exports.vote = function(req, res, comment) {
            total: (comment.upVotes.length - comment.downVotes.length)
        });
    });
}
};


exports.requireLoggedInUser = function(req, res, next) {
@@ -103,7 +103,7 @@ exports.requireLoggedInUser = function(req, res, next) {
    } else {
        next();
    }
}
};

exports.findComment = function(req, res, next) {

@@ -116,7 +116,7 @@ exports.findComment = function(req, res, next) {
        res.json({success: false, reason: 'No such comment'});
    }

}
};