{"action":"created","issue":{"url":"https://api.github.com/repos/Dmo582251/forum_project2/issues/3","labels_url":"https://api.github.com/repos/Dmo582251/forum_project2/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/Dmo582251/forum_project2/issues/3/comments","events_url":"https://api.github.com/repos/Dmo582251/forum_project2/issues/3/events","html_url":"https://github.com/Dmo582251/forum_project2/issues/3","id":96334243,"number":3,"title":"Attempting to have my user info come up in a topic","user":{"login":"Dmo582251","id":8561114,"avatar_url":"https://avatars.githubusercontent.com/u/8561114?v=3","gravatar_id":"","url":"https://api.github.com/users/Dmo582251","html_url":"https://github.com/Dmo582251","followers_url":"https://api.github.com/users/Dmo582251/followers","following_url":"https://api.github.com/users/Dmo582251/following{/other_user}","gists_url":"https://api.github.com/users/Dmo582251/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmo582251/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmo582251/subscriptions","organizations_url":"https://api.github.com/users/Dmo582251/orgs","repos_url":"https://api.github.com/users/Dmo582251/repos","events_url":"https://api.github.com/users/Dmo582251/events{/privacy}","received_events_url":"https://api.github.com/users/Dmo582251/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-07-21T14:41:11Z","updated_at":"2015-11-24T17:22:26Z","closed_at":null,"body":"What User Story you are currently working on\r\n - Displaying all posts in topic with user info\r\nWhat you are trying to do\r\n- access user info of the post when the topic is displayed\r\n\r\nDetailed description of the bug or error\r\n- I cannot access the user info\r\nRelevant code/files/errors, screenshots\r\napp.get('/topics/:id', function (req, res){\r\n\t\tdb.find('topics', req.params.id, function (topic){\r\n\t\t// topics\r\n\t\tvar data = {\r\n\t\t\ttopic: topic[0]\r\n\t\t};\r\n\t\t\tdb.findRelations('posts', 'topic_id', req.params.id, function (posts){\r\n\t\t\t\tdata.topic.posts = posts;\r\n\t\t\t\tconsole.log(\"THESE ARE POSTS\", posts);\r\n\t\t\t\t\r\n\t\t\t\t// data.topic.posts.forEach( function ( post, post_index, posts ){\r\n\t\t\t\t// });\r\n\r\n\t\t\t\t// for(var i = 0; i < posts.length; i++){\r\n\t\t\t\t// \tdb.find('users', posts[i-1].user_id , function (user){\r\n\t\t\t\t// \t\tconsole.log(\"THIS IS THE USER SHIT\", user);\r\n\t\t\t\t// \t\tposts[i-1].user = user;\r\n\t\t\t\t// \t});\r\n\t\t\t\t// };\r\n\r\n\t\t\t\tres.render('topicsShow', data);\r\n\t\t\t\t\r\n\t\t\t\t// var data = {\r\n    //       topic: topic[0],\r\n    //       posts: posts\r\n\t\t\t\t// };\r\n\t\t\t\t// console.log(req.session);\r\n\t\t\t\t\r\n\t\t\t});\t\r\n\t\t});\r\n\t});\r\n\r\nPART 2:\r\nDocumentation you have looked at\r\n- topics and posts\r\nSteps you have taken to solve the problem\r\n- i have tried to do joins, loops, nest in a nest nothing is accessing the info\r\nResources you have used\r\nwebsites\r\n\r\nWhat would you like help with specifically?\r\n- I would like help grabbibng the user info in the post and displaying it in the topic\r\n\r\n@dbrodsky90 @WilliamfShaw"},"comment":{"url":"https://api.github.com/repos/Dmo582251/forum_project2/issues/comments/159347181","html_url":"https://github.com/Dmo582251/forum_project2/issues/3#issuecomment-159347181","issue_url":"https://api.github.com/repos/Dmo582251/forum_project2/issues/3","id":159347181,"user":{"login":"Dmo582251","id":8561114,"avatar_url":"https://avatars.githubusercontent.com/u/8561114?v=3","gravatar_id":"","url":"https://api.github.com/users/Dmo582251","html_url":"https://github.com/Dmo582251","followers_url":"https://api.github.com/users/Dmo582251/followers","following_url":"https://api.github.com/users/Dmo582251/following{/other_user}","gists_url":"https://api.github.com/users/Dmo582251/gists{/gist_id}","starred_url":"https://api.github.com/users/Dmo582251/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dmo582251/subscriptions","organizations_url":"https://api.github.com/users/Dmo582251/orgs","repos_url":"https://api.github.com/users/Dmo582251/repos","events_url":"https://api.github.com/users/Dmo582251/events{/privacy}","received_events_url":"https://api.github.com/users/Dmo582251/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T17:22:26Z","updated_at":"2015-11-24T17:22:26Z","body":"LOL I'm sorry! I haven't been on it!!!! Ill do it now\n\nOn Tue, Nov 24, 2015 at 11:02 AM, David Brodsky <notifications@github.com>\nwrote:\n\n> @Dmo582251 <https://github.com/Dmo582251> Hey Dom, hope all is well.\n> cmmmmmmannnnnnnnnnnnnnnnnnnnnn\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/Dmo582251/forum_project2/issues/3#issuecomment-159314148>\n> .\n>\n"}}