{"action":"created","issue":{"url":"https://api.github.com/repos/nswbmw/N-blog/issues/159","repository_url":"https://api.github.com/repos/nswbmw/N-blog","labels_url":"https://api.github.com/repos/nswbmw/N-blog/issues/159/labels{/name}","comments_url":"https://api.github.com/repos/nswbmw/N-blog/issues/159/comments","events_url":"https://api.github.com/repos/nswbmw/N-blog/issues/159/events","html_url":"https://github.com/nswbmw/N-blog/issues/159","id":164010545,"number":159,"title":"第一章提交注册后出错","user":{"login":"dshkwnds","id":12288789,"avatar_url":"https://avatars.githubusercontent.com/u/12288789?v=3","gravatar_id":"","url":"https://api.github.com/users/dshkwnds","html_url":"https://github.com/dshkwnds","followers_url":"https://api.github.com/users/dshkwnds/followers","following_url":"https://api.github.com/users/dshkwnds/following{/other_user}","gists_url":"https://api.github.com/users/dshkwnds/gists{/gist_id}","starred_url":"https://api.github.com/users/dshkwnds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dshkwnds/subscriptions","organizations_url":"https://api.github.com/users/dshkwnds/orgs","repos_url":"https://api.github.com/users/dshkwnds/repos","events_url":"https://api.github.com/users/dshkwnds/events{/privacy}","received_events_url":"https://api.github.com/users/dshkwnds/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-07-06T06:52:33Z","updated_at":"2016-07-27T08:08:07Z","closed_at":null,"body":"GET /reg 304 14.474 ms - -\r\nGET /stylesheets/style.css 304 2.976 ms - -\r\n/opt/blog/node_modules/mongodb/lib/utils.js:98\r\n    process.nextTick(function() { throw err; });\r\n                                  ^\r\n\r\nTypeError: Cannot set property 'user' of undefined\r\n    at /opt/blog/routes/index.js:34:24\r\n    at /opt/blog/models/user.js:57:17\r\n    at handleCallback (/opt/blog/node_modules/mongodb/lib/utils.js:96:12)\r\n    at /opt/blog/node_modules/mongodb/lib/collection.js:1357:5\r\n    at handleCallback (/opt/blog/node_modules/mongodb/lib/utils.js:96:12)\r\n    at /opt/blog/node_modules/mongodb/lib/cursor.js:661:5\r\n    at handleCallback (/opt/blog/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:159:5)\r\n    at setCursorNotified (/opt/blog/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:511:3)\r\n    at /opt/blog/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:582:16\r\n    at queryCallback (/opt/blog/node_modules/mongodb/node_modules/mongodb-core/lib/cursor.js:220:18)\r\n    at Callbacks.emit (/opt/blog/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:119:3)\r\n    at null.messageHandler (/opt/blog/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/server.js:358:23)\r\n    at Socket.<anonymous> (/opt/blog/node_modules/mongodb/node_modules/mongodb-core/lib/connection/connection.js:292:22)\r\n    at emitOne (events.js:77:13)\r\n    at Socket.emit (events.js:169:7)\r\n    at readableAddChunk (_stream_readable.js:153:18)\r\n\r\n请老司机指导"},"comment":{"url":"https://api.github.com/repos/nswbmw/N-blog/issues/comments/235515829","html_url":"https://github.com/nswbmw/N-blog/issues/159#issuecomment-235515829","issue_url":"https://api.github.com/repos/nswbmw/N-blog/issues/159","id":235515829,"user":{"login":"yehbeats","id":11437169,"avatar_url":"https://avatars.githubusercontent.com/u/11437169?v=3","gravatar_id":"","url":"https://api.github.com/users/yehbeats","html_url":"https://github.com/yehbeats","followers_url":"https://api.github.com/users/yehbeats/followers","following_url":"https://api.github.com/users/yehbeats/following{/other_user}","gists_url":"https://api.github.com/users/yehbeats/gists{/gist_id}","starred_url":"https://api.github.com/users/yehbeats/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yehbeats/subscriptions","organizations_url":"https://api.github.com/users/yehbeats/orgs","repos_url":"https://api.github.com/users/yehbeats/repos","events_url":"https://api.github.com/users/yehbeats/events{/privacy}","received_events_url":"https://api.github.com/users/yehbeats/received_events","type":"User","site_admin":false},"created_at":"2016-07-27T08:08:07Z","updated_at":"2016-07-27T08:08:07Z","body":"**保证routes(app);在**\r\napp.use(session({\r\n  secret: settings.cookieSecret,\r\n  key: settings.db,//cookie name\r\n  cookie: {maxAge: 1000 * 60 * 60 * 24 * 30},//30 days\r\n  store: new MongoStore({\r\n    url: 'mongodb://localhost/blog'\r\n  })\r\n}));\r\napp.use(flash());\r\n\r\n**之后**"}}
{"actor":{"display_login":"yehbeats"}}