Commit 0b5eaec0 authored by Rene Saarsoo's avatar Rene Saarsoo
Browse files

Fix fatal error in comments/.../undo_delete request.

parent a9e302b2
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -198,7 +198,8 @@ app.post('/auth/:sdk/:version/comments/:commentId/delete', Auth.isLoggedIn, Auth

// Restores a deleted comment
app.post('/auth/:sdk/:version/comments/:commentId/undo_delete', Auth.isLoggedIn, Auth.canModify, function(req, res) {
    new Request(req).setDeleted(req.params.commentId, false, function() {
    var r = new Request(req);
    r.setDeleted(req.params.commentId, false, function() {
        r.getComment(req.params.commentId, function(comment) {
            res.send({ success: true, comment: comment });
        });