var db = require('../../models');

module.exports = function (req, res, next) {
    var userId = req.user._id;



    db.Article
        .findById(req.params.id)
        .exec(function (err, article) {
            if (article.author !== userId) {
                return next(new Error('YOU_CAN_NOT_DELETE'));
            }

            article.trashed= true;
            article.save(function (err, doc) {
                if (err) {
                    console.log(err.message);
                    console.log(err.stack);

                    req.flash('error', '刪除失敗');
                    res.redirect('/articles');
                    return;
                }
                req.flash('info', '刪除成功');
                res.redirect('/articles');
            });
        });

};

@@ -262,50 +262,99 @@
   re
-turn next(new Error('YOU_CAN_NOT_DELETE'))
+q.flash('error', '%E5%88%AA%E9%99%A4%E5%A4%B1%E6%95%97');%0A                res.redirect('/articles');%0A                return
 ;%0A  

Update actionRemove.js