{"action":"closed","issue":{"url":"https://api.github.com/repos/girlcodeakl/girlcode2017-term2/issues/9","repository_url":"https://api.github.com/repos/girlcodeakl/girlcode2017-term2","labels_url":"https://api.github.com/repos/girlcodeakl/girlcode2017-term2/issues/9/labels{/name}","comments_url":"https://api.github.com/repos/girlcodeakl/girlcode2017-term2/issues/9/comments","events_url":"https://api.github.com/repos/girlcodeakl/girlcode2017-term2/issues/9/events","html_url":"https://github.com/girlcodeakl/girlcode2017-term2/issues/9","id":232582037,"number":9,"title":"Save and display the author of each post ","user":{"login":"mgatland","id":364886,"avatar_url":"https://avatars1.githubusercontent.com/u/364886?v=3","gravatar_id":"","url":"https://api.github.com/users/mgatland","html_url":"https://github.com/mgatland","followers_url":"https://api.github.com/users/mgatland/followers","following_url":"https://api.github.com/users/mgatland/following{/other_user}","gists_url":"https://api.github.com/users/mgatland/gists{/gist_id}","starred_url":"https://api.github.com/users/mgatland/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mgatland/subscriptions","organizations_url":"https://api.github.com/users/mgatland/orgs","repos_url":"https://api.github.com/users/mgatland/repos","events_url":"https://api.github.com/users/mgatland/events{/privacy}","received_events_url":"https://api.github.com/users/mgatland/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"Krikaya","id":28618744,"avatar_url":"https://avatars0.githubusercontent.com/u/28618744?v=3","gravatar_id":"","url":"https://api.github.com/users/Krikaya","html_url":"https://github.com/Krikaya","followers_url":"https://api.github.com/users/Krikaya/followers","following_url":"https://api.github.com/users/Krikaya/following{/other_user}","gists_url":"https://api.github.com/users/Krikaya/gists{/gist_id}","starred_url":"https://api.github.com/users/Krikaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krikaya/subscriptions","organizations_url":"https://api.github.com/users/Krikaya/orgs","repos_url":"https://api.github.com/users/Krikaya/repos","events_url":"https://api.github.com/users/Krikaya/events{/privacy}","received_events_url":"https://api.github.com/users/Krikaya/received_events","type":"User","site_admin":false},"assignees":[{"login":"Krikaya","id":28618744,"avatar_url":"https://avatars0.githubusercontent.com/u/28618744?v=3","gravatar_id":"","url":"https://api.github.com/users/Krikaya","html_url":"https://github.com/Krikaya","followers_url":"https://api.github.com/users/Krikaya/followers","following_url":"https://api.github.com/users/Krikaya/following{/other_user}","gists_url":"https://api.github.com/users/Krikaya/gists{/gist_id}","starred_url":"https://api.github.com/users/Krikaya/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Krikaya/subscriptions","organizations_url":"https://api.github.com/users/Krikaya/orgs","repos_url":"https://api.github.com/users/Krikaya/repos","events_url":"https://api.github.com/users/Krikaya/events{/privacy}","received_events_url":"https://api.github.com/users/Krikaya/received_events","type":"User","site_admin":false},{"login":"hazel00","id":28945145,"avatar_url":"https://avatars1.githubusercontent.com/u/28945145?v=3","gravatar_id":"","url":"https://api.github.com/users/hazel00","html_url":"https://github.com/hazel00","followers_url":"https://api.github.com/users/hazel00/followers","following_url":"https://api.github.com/users/hazel00/following{/other_user}","gists_url":"https://api.github.com/users/hazel00/gists{/gist_id}","starred_url":"https://api.github.com/users/hazel00/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hazel00/subscriptions","organizations_url":"https://api.github.com/users/hazel00/orgs","repos_url":"https://api.github.com/users/hazel00/repos","events_url":"https://api.github.com/users/hazel00/events{/privacy}","received_events_url":"https://api.github.com/users/hazel00/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-05-31T14:21:02Z","updated_at":"2017-06-08T08:20:23Z","closed_at":"2017-06-08T08:20:23Z","body":"When a user posts a new post, let them put in their name so we know who posted it.\r\n\r\nWe'll add a new text input (the white box you type words into) to _post.html_\r\n### Act 1\r\n- [x] in post.html, add a new text `<input>` field where the user can write their name. You can copy and paste the input where they write their message. Now there will be two places you can write in when you look at the page.\r\n- (Don't copy the whole form - we're just adding a new input, which is the empty space you write into, to the existing form. There should still only be one 'Post it!' button for the whole form.\r\n- [x] Give your new `<input>` field has a unique class name, e.g. `class=\"nameInput\"`\r\n- [x] Check: open localhost:3000/post.html and check your new input field appears on the form.\r\n### Act 2\r\n\r\nNow we need to send the author text to the server when they click 'Post it!'.\r\n- [x] Look at the instructions for issue #2 , Act 3. Note how we get a value out of an input, and how we add it to the `data` object so it will be sent to the server.\r\n- [x] Now make it so when the user clicks the button, the author text is added to the data object and sent to the server. You will need to add one line to the javascript in post.html. This will be very similar to the line that starts with `data.message =`… but will need to set `data.author` instead.\r\n### Act 3\r\n\r\nNow it's (hopefully) being sent to the server, we need to teach the server to look out for this new information.\r\n- [x] We're now working in _index.js_\r\n- [x] find for the code that is run when a user POSTS a new post to the server.\r\n- [x] there is a line that writes the post's message to the console using `console.log(request.body.message);`. Add another line that logs request.body.author as well. ('author' needs to match whatever you saved it as in the data object back in feed.html)\r\n- [x] Restart the server, post a new post and check that your author name now shows up in terminal/command prompt.\r\n- [x] If the author name is coming through, we can now save it. You do this by setting a new new name-value pair on the `post`. Your code might look like this:\r\n\r\n``` javascript\r\npost.author = request.body.author;\r\n```\r\n### Act 4\r\n- [x] Save some new posts then check how they look in raw form at http://localhost:3000/posts – each post should have a _message_ and an _author_.\r\n- [x] modify feed.html so that each post displays the author (`post.author`). Try this code to start with (add it after the code that creates postElement:\r\n\r\n``` javascript\r\nvar authorElement = $('<div>author goes here</div>');\r\npostElement.append(authorElement);\r\n```\r\n\r\nYou'll need to change it to include the actual author value `post.author` - you may need to use quotation marks to make it clear that you want the actual `post.author` and don't want it to literally say \"post.author\"\r\n### notes\r\n\r\nThis task does not include updating the CSS look + feel of the post.html page. Just make it work, don't focus on making it pretty in this ticket.\r\n"}}
{"actor":{"display_login":"mgatland"}}