This commit is contained in:
alsotang 2014-07-01 23:12:16 +08:00
parent a10dab74f8
commit 72ef6d4609
5 changed files with 9 additions and 9 deletions

View File

@ -15,7 +15,7 @@ var config = {
site_headers: [
'<meta name="author" content="EDP@TAOBAO" />',
],
host: 'localhost.cnodejs.org',
host: 'localhost',
// 默认的Google tracker ID自有站点请修改申请地址http://www.google.com/analytics/
google_tracker_id: 'UA-41753901-5',
site_logo: '', // default is `name`

View File

@ -3,7 +3,7 @@ var eventproxy = require('eventproxy');
exports.index = function (req, res, next) {
if (!req.session.user) {
res.redirect('home');
res.redirect('/');
return;
}
var user_id = req.session.user._id;

View File

@ -150,7 +150,7 @@ exports.delete = function (req, res, next) {
*/
exports.showEdit = function (req, res, next) {
if (!req.session.user) {
res.redirect('home');
res.redirect('/');
return;
}
@ -179,7 +179,7 @@ exports.showEdit = function (req, res, next) {
*/
exports.update = function (req, res, next) {
if (!req.session.user) {
res.redirect('home');
res.redirect('/');
return;
}
var reply_id = req.params.reply_id;

View File

@ -158,7 +158,7 @@ exports.put = function (req, res, next) {
exports.showEdit = function (req, res, next) {
if (!req.session.user) {
res.redirect('home');
res.redirect('/');
return;
}
@ -195,7 +195,7 @@ exports.showEdit = function (req, res, next) {
exports.update = function (req, res, next) {
if (!req.session.user) {
res.redirect('home');
res.redirect('/');
return;
}
var topic_id = req.params.tid;
@ -331,7 +331,7 @@ exports.delete = function (req, res, next) {
exports.top = function (req, res, next) {
if (!req.session.user.is_admin) {
res.redirect('home');
res.redirect('/');
return;
}
var topic_id = req.params.tid;

View File

@ -85,7 +85,7 @@ exports.show_stars = function (req, res, next) {
exports.showSetting = function (req, res, next) {
if (!req.session.user) {
res.redirect('home');
res.redirect('/');
return;
}
@ -103,7 +103,7 @@ exports.showSetting = function (req, res, next) {
exports.setting = function (req, res, next) {
if (!req.session.user) {
res.redirect('home');
res.redirect('/');
return;
}