{"action":"opened","number":22,"pull_request":{"url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/pulls/22","id":210965139,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEwOTY1MTM5","html_url":"https://github.com/PriscillaSam/Stackoverflow-Lite/pull/22","diff_url":"https://github.com/PriscillaSam/Stackoverflow-Lite/pull/22.diff","patch_url":"https://github.com/PriscillaSam/Stackoverflow-Lite/pull/22.patch","issue_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/issues/22","number":22,"state":"open","locked":false,"title":"Api endpoint to update an answer.","user":{"login":"PriscillaSam","id":29674347,"node_id":"MDQ6VXNlcjI5Njc0MzQ3","avatar_url":"https://avatars1.githubusercontent.com/u/29674347?v=4","gravatar_id":"","url":"https://api.github.com/users/PriscillaSam","html_url":"https://github.com/PriscillaSam","followers_url":"https://api.github.com/users/PriscillaSam/followers","following_url":"https://api.github.com/users/PriscillaSam/following{/other_user}","gists_url":"https://api.github.com/users/PriscillaSam/gists{/gist_id}","starred_url":"https://api.github.com/users/PriscillaSam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PriscillaSam/subscriptions","organizations_url":"https://api.github.com/users/PriscillaSam/orgs","repos_url":"https://api.github.com/users/PriscillaSam/repos","events_url":"https://api.github.com/users/PriscillaSam/events{/privacy}","received_events_url":"https://api.github.com/users/PriscillaSam/received_events","type":"User","site_admin":false},"body":"#### What does this PR do?\r\nModify api endpoint **PUT** `api/v1/questions/:id/answers/:id` to use data from database.\r\n\r\n#### Description of Task to be completed?\r\n- Implement functionality to update an answer.\r\n- Implement functionality to mark an answer as accepted.\r\n- Refactor tests to use database.\r\n\r\n#### How should this be manually tested?\r\n* Open terminal and clone the repo using `git clone https://github.com/PriscillaSam/Stackoverflow-Lite.git`.\r\n* run `git checkout ft-update-answer-160022015`\r\n* run `npm install` and `npm start`.\r\n* Open up Postman and test **PUT** `localhost:3000/api/v1/questions/:id/answers/:id`.\r\n\r\n#### Any background context you want to provide?\r\nNone.\r\n\r\n#### What are the relevant pivotal tracker stories?\r\n#160022015, #160021774","created_at":"2018-08-26T18:48:56Z","updated_at":"2018-08-26T18:48:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/pulls/22/commits","review_comments_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/pulls/22/comments","review_comment_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/issues/22/comments","statuses_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/statuses/d8ca78791c99c101ad655e1aff487a088ca546b2","head":{"label":"PriscillaSam:ft-update-answer-160022015","ref":"ft-update-answer-160022015","sha":"d8ca78791c99c101ad655e1aff487a088ca546b2","user":{"login":"PriscillaSam","id":29674347,"node_id":"MDQ6VXNlcjI5Njc0MzQ3","avatar_url":"https://avatars1.githubusercontent.com/u/29674347?v=4","gravatar_id":"","url":"https://api.github.com/users/PriscillaSam","html_url":"https://github.com/PriscillaSam","followers_url":"https://api.github.com/users/PriscillaSam/followers","following_url":"https://api.github.com/users/PriscillaSam/following{/other_user}","gists_url":"https://api.github.com/users/PriscillaSam/gists{/gist_id}","starred_url":"https://api.github.com/users/PriscillaSam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PriscillaSam/subscriptions","organizations_url":"https://api.github.com/users/PriscillaSam/orgs","repos_url":"https://api.github.com/users/PriscillaSam/repos","events_url":"https://api.github.com/users/PriscillaSam/events{/privacy}","received_events_url":"https://api.github.com/users/PriscillaSam/received_events","type":"User","site_admin":false},"repo":{"id":143856339,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM4NTYzMzk=","name":"Stackoverflow-Lite","full_name":"PriscillaSam/Stackoverflow-Lite","owner":{"login":"PriscillaSam","id":29674347,"node_id":"MDQ6VXNlcjI5Njc0MzQ3","avatar_url":"https://avatars1.githubusercontent.com/u/29674347?v=4","gravatar_id":"","url":"https://api.github.com/users/PriscillaSam","html_url":"https://github.com/PriscillaSam","followers_url":"https://api.github.com/users/PriscillaSam/followers","following_url":"https://api.github.com/users/PriscillaSam/following{/other_user}","gists_url":"https://api.github.com/users/PriscillaSam/gists{/gist_id}","starred_url":"https://api.github.com/users/PriscillaSam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PriscillaSam/subscriptions","organizations_url":"https://api.github.com/users/PriscillaSam/orgs","repos_url":"https://api.github.com/users/PriscillaSam/repos","events_url":"https://api.github.com/users/PriscillaSam/events{/privacy}","received_events_url":"https://api.github.com/users/PriscillaSam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PriscillaSam/Stackoverflow-Lite","description":null,"fork":false,"url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite","forks_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/forks","keys_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/teams","hooks_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/hooks","issue_events_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/issues/events{/number}","events_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/events","assignees_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/assignees{/user}","branches_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/branches{/branch}","tags_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/tags","blobs_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/statuses/{sha}","languages_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/languages","stargazers_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/stargazers","contributors_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/contributors","subscribers_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/subscribers","subscription_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/subscription","commits_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/issues/comments{/number}","contents_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/contents/{+path}","compare_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/merges","archive_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/downloads","issues_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/issues{/number}","pulls_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/pulls{/number}","milestones_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/milestones{/number}","notifications_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/labels{/name}","releases_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/releases{/id}","deployments_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/deployments","created_at":"2018-08-07T10:16:04Z","updated_at":"2018-08-25T21:43:26Z","pushed_at":"2018-08-26T18:30:11Z","git_url":"git://github.com/PriscillaSam/Stackoverflow-Lite.git","ssh_url":"git@github.com:PriscillaSam/Stackoverflow-Lite.git","clone_url":"https://github.com/PriscillaSam/Stackoverflow-Lite.git","svn_url":"https://github.com/PriscillaSam/Stackoverflow-Lite","homepage":null,"size":1588,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"base":{"label":"PriscillaSam:challenge3","ref":"challenge3","sha":"25757dbb2e6ebc92ddfd1e440ff1011e0ec32ccf","user":{"login":"PriscillaSam","id":29674347,"node_id":"MDQ6VXNlcjI5Njc0MzQ3","avatar_url":"https://avatars1.githubusercontent.com/u/29674347?v=4","gravatar_id":"","url":"https://api.github.com/users/PriscillaSam","html_url":"https://github.com/PriscillaSam","followers_url":"https://api.github.com/users/PriscillaSam/followers","following_url":"https://api.github.com/users/PriscillaSam/following{/other_user}","gists_url":"https://api.github.com/users/PriscillaSam/gists{/gist_id}","starred_url":"https://api.github.com/users/PriscillaSam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PriscillaSam/subscriptions","organizations_url":"https://api.github.com/users/PriscillaSam/orgs","repos_url":"https://api.github.com/users/PriscillaSam/repos","events_url":"https://api.github.com/users/PriscillaSam/events{/privacy}","received_events_url":"https://api.github.com/users/PriscillaSam/received_events","type":"User","site_admin":false},"repo":{"id":143856339,"node_id":"MDEwOlJlcG9zaXRvcnkxNDM4NTYzMzk=","name":"Stackoverflow-Lite","full_name":"PriscillaSam/Stackoverflow-Lite","owner":{"login":"PriscillaSam","id":29674347,"node_id":"MDQ6VXNlcjI5Njc0MzQ3","avatar_url":"https://avatars1.githubusercontent.com/u/29674347?v=4","gravatar_id":"","url":"https://api.github.com/users/PriscillaSam","html_url":"https://github.com/PriscillaSam","followers_url":"https://api.github.com/users/PriscillaSam/followers","following_url":"https://api.github.com/users/PriscillaSam/following{/other_user}","gists_url":"https://api.github.com/users/PriscillaSam/gists{/gist_id}","starred_url":"https://api.github.com/users/PriscillaSam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PriscillaSam/subscriptions","organizations_url":"https://api.github.com/users/PriscillaSam/orgs","repos_url":"https://api.github.com/users/PriscillaSam/repos","events_url":"https://api.github.com/users/PriscillaSam/events{/privacy}","received_events_url":"https://api.github.com/users/PriscillaSam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PriscillaSam/Stackoverflow-Lite","description":null,"fork":false,"url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite","forks_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/forks","keys_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/teams","hooks_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/hooks","issue_events_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/issues/events{/number}","events_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/events","assignees_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/assignees{/user}","branches_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/branches{/branch}","tags_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/tags","blobs_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/statuses/{sha}","languages_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/languages","stargazers_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/stargazers","contributors_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/contributors","subscribers_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/subscribers","subscription_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/subscription","commits_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/issues/comments{/number}","contents_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/contents/{+path}","compare_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/merges","archive_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/downloads","issues_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/issues{/number}","pulls_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/pulls{/number}","milestones_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/milestones{/number}","notifications_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/labels{/name}","releases_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/releases{/id}","deployments_url":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/deployments","created_at":"2018-08-07T10:16:04Z","updated_at":"2018-08-25T21:43:26Z","pushed_at":"2018-08-26T18:30:11Z","git_url":"git://github.com/PriscillaSam/Stackoverflow-Lite.git","ssh_url":"git@github.com:PriscillaSam/Stackoverflow-Lite.git","clone_url":"https://github.com/PriscillaSam/Stackoverflow-Lite.git","svn_url":"https://github.com/PriscillaSam/Stackoverflow-Lite","homepage":null,"size":1588,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/pulls/22"},"html":{"href":"https://github.com/PriscillaSam/Stackoverflow-Lite/pull/22"},"issue":{"href":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/issues/22"},"comments":{"href":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/PriscillaSam/Stackoverflow-Lite/statuses/d8ca78791c99c101ad655e1aff487a088ca546b2"}},"author_association":"OWNER","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":231,"deletions":117,"changed_files":10}}
{"actor":{"display_login":"PriscillaSam"}}