Showing
2 changed files
with
4 additions
and
2 deletions
@@ -3,7 +3,9 @@ module.exports=function(app) { | @@ -3,7 +3,9 @@ module.exports=function(app) { | ||
3 | 3 | ||
4 | app.get("/login","common.Login"); | 4 | app.get("/login","common.Login"); |
5 | 5 | ||
6 | - app.get("/logout","common.Login"); | 6 | + app.get("/logout","common.Login",function (req) { |
7 | + delete req.session.user; | ||
8 | + }); | ||
7 | 9 | ||
8 | app.post("/login", "common_login", function (login, req, res){ | 10 | app.post("/login", "common_login", function (login, req, res){ |
9 | if (login.code == 200) { | 11 | if (login.code == 200) { |
@@ -170,7 +170,7 @@ module.exports={ | @@ -170,7 +170,7 @@ module.exports={ | ||
170 | } | 170 | } |
171 | }); | 171 | }); |
172 | } else { | 172 | } else { |
173 | - result = { code: 200, message: "不受权限控制" }; | 173 | + result = { code: 201, message: "不受权限控制" }; |
174 | return callback(null, result); | 174 | return callback(null, result); |
175 | } | 175 | } |
176 | } else { | 176 | } else { |
-
Please register or login to post a comment