mirror of
https://github.com/cnodejs/nodeclub.git
synced 2025-12-08 19:55:55 +00:00
fix #352
This commit is contained in:
parent
a10dab74f8
commit
72ef6d4609
@ -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`
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user