{"action":"opened","issue":{"url":"https://api.github.com/repos/dickeyxxx/mean-sample/issues/24","labels_url":"https://api.github.com/repos/dickeyxxx/mean-sample/issues/24/labels{/name}","comments_url":"https://api.github.com/repos/dickeyxxx/mean-sample/issues/24/comments","events_url":"https://api.github.com/repos/dickeyxxx/mean-sample/issues/24/events","html_url":"https://github.com/dickeyxxx/mean-sample/issues/24","id":71157679,"number":24,"title":"CH8 : post.username: req.auth.username error?","user":{"login":"fkkcloud","id":3806802,"avatar_url":"https://avatars.githubusercontent.com/u/3806802?v=3","gravatar_id":"","url":"https://api.github.com/users/fkkcloud","html_url":"https://github.com/fkkcloud","followers_url":"https://api.github.com/users/fkkcloud/followers","following_url":"https://api.github.com/users/fkkcloud/following{/other_user}","gists_url":"https://api.github.com/users/fkkcloud/gists{/gist_id}","starred_url":"https://api.github.com/users/fkkcloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fkkcloud/subscriptions","organizations_url":"https://api.github.com/users/fkkcloud/orgs","repos_url":"https://api.github.com/users/fkkcloud/repos","events_url":"https://api.github.com/users/fkkcloud/events{/privacy}","received_events_url":"https://api.github.com/users/fkkcloud/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-04-27T02:31:40Z","updated_at":"2015-04-27T02:31:40Z","closed_at":null,"body":"Hi, I am not sure why this gives me an error..\r\n\r\n---------------\r\n/Users/user/Desktop/mean_ssn/controller/api/posts.js:19\r\n\tpost.username: req.auth.username\r\n\t             ^\r\nSyntaxError: Unexpected token :\r\n    at exports.runInThisContext (vm.js:73:16)\r\n    at Module._compile (module.js:443:25)\r\n    at Object.Module._extensions..js (module.js:478:10)\r\n    at Module.load (module.js:355:32)\r\n    at Function.Module._load (module.js:310:12)\r\n    at Module.require (module.js:365:17)\r\n    at require (module.js:384:17)\r\n    at Object.<anonymous> (/Users/user/Desktop/mean_ssn/server.js:7:23)\r\n    at Module._compile (module.js:460:26)\r\n    at Object.Module._extensions..js (module.js:478:10)\r\n------------------\r\n\r\ncontroller/api/posts.js\r\n\r\nrouter.post('/', function(req, res, next){\r\n\tvar post = new Post({ body: req.body.body })\r\n\t\r\n\tpost.username: req.auth.username\r\n\r\n\tpost.save(function (err, post){\r\n\t\tif (err)\r\n\t\t{\r\n\t\t\treturn next(err)\r\n\t\t}\r\n\t\tres.json(201, post)\r\n\t})\r\n})\r\n\r\nmodule.exports = router"}}