{"action":"created","comment":{"url":"https://api.github.com/repos/niketa-webonise/gror/pulls/comments/191160348","pull_request_review_id":123680078,"id":191160348,"diff_hunk":"@@ -0,0 +1,117 @@\n+package controllers\n+\n+import (\n+\t\"encoding/json\"\n+\t\"fmt\"\n+\t\"log\"\n+\t\"net/http\"\n+\n+\t\"github.com/darahayes/go-boom\"\n+\t\"github.com/gorilla/mux\"\n+\t\"github.com/gror/models\"\n+\t\"github.com/gror/services\"\n+\t\"gopkg.in/mgo.v2/bson\"\n+)\n+\n+func respondWithError(w http.ResponseWriter, code int, msg string) {\n+\trespondWithJson(w, code, map[string]string{\"error\": msg})\n+}\n+\n+func respondWithJson(w http.ResponseWriter, code int, payload interface{}) {\n+\tresponse, err1 := json.Marshal(payload)\n+\tif err1 != nil {\n+\t\tlog.Fatal(err1)\n+\t\treturn\n+\t}\n+\tw.Header().Set(\"Content-Type\", \"application/json\")\n+\tw.WriteHeader(code)","path":"controllers/controller.go","position":27,"original_position":27,"commit_id":"851351fb155638535da06f4ec7955e4653576220","original_commit_id":"851351fb155638535da06f4ec7955e4653576220","user":{"login":"naveen-webonise","id":9838709,"avatar_url":"https://avatars1.githubusercontent.com/u/9838709?v=4","gravatar_id":"","url":"https://api.github.com/users/naveen-webonise","html_url":"https://github.com/naveen-webonise","followers_url":"https://api.github.com/users/naveen-webonise/followers","following_url":"https://api.github.com/users/naveen-webonise/following{/other_user}","gists_url":"https://api.github.com/users/naveen-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/naveen-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/naveen-webonise/subscriptions","organizations_url":"https://api.github.com/users/naveen-webonise/orgs","repos_url":"https://api.github.com/users/naveen-webonise/repos","events_url":"https://api.github.com/users/naveen-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/naveen-webonise/received_events","type":"User","site_admin":false},"body":"Why set `code` in `header`? ","created_at":"2018-05-28T09:35:54Z","updated_at":"2018-05-28T09:55:38Z","html_url":"https://github.com/niketa-webonise/gror/pull/1#discussion_r191160348","pull_request_url":"https://api.github.com/repos/niketa-webonise/gror/pulls/1","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/niketa-webonise/gror/pulls/comments/191160348"},"html":{"href":"https://github.com/niketa-webonise/gror/pull/1#discussion_r191160348"},"pull_request":{"href":"https://api.github.com/repos/niketa-webonise/gror/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/niketa-webonise/gror/pulls/1","id":190505605,"html_url":"https://github.com/niketa-webonise/gror/pull/1","diff_url":"https://github.com/niketa-webonise/gror/pull/1.diff","patch_url":"https://github.com/niketa-webonise/gror/pull/1.patch","issue_url":"https://api.github.com/repos/niketa-webonise/gror/issues/1","number":1,"state":"open","locked":false,"title":"added controllers to create,update and get configuration","user":{"login":"niketa-webonise","id":36664544,"avatar_url":"https://avatars1.githubusercontent.com/u/36664544?v=4","gravatar_id":"","url":"https://api.github.com/users/niketa-webonise","html_url":"https://github.com/niketa-webonise","followers_url":"https://api.github.com/users/niketa-webonise/followers","following_url":"https://api.github.com/users/niketa-webonise/following{/other_user}","gists_url":"https://api.github.com/users/niketa-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/niketa-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niketa-webonise/subscriptions","organizations_url":"https://api.github.com/users/niketa-webonise/orgs","repos_url":"https://api.github.com/users/niketa-webonise/repos","events_url":"https://api.github.com/users/niketa-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/niketa-webonise/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-25T07:42:10Z","updated_at":"2018-05-28T09:55:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"695afa0f15f487d5b30ed4c3b539d165e36358d1","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/niketa-webonise/gror/pulls/1/commits","review_comments_url":"https://api.github.com/repos/niketa-webonise/gror/pulls/1/comments","review_comment_url":"https://api.github.com/repos/niketa-webonise/gror/pulls/comments{/number}","comments_url":"https://api.github.com/repos/niketa-webonise/gror/issues/1/comments","statuses_url":"https://api.github.com/repos/niketa-webonise/gror/statuses/851351fb155638535da06f4ec7955e4653576220","head":{"label":"niketa-webonise:feature_save_get_config","ref":"feature_save_get_config","sha":"851351fb155638535da06f4ec7955e4653576220","user":{"login":"niketa-webonise","id":36664544,"avatar_url":"https://avatars1.githubusercontent.com/u/36664544?v=4","gravatar_id":"","url":"https://api.github.com/users/niketa-webonise","html_url":"https://github.com/niketa-webonise","followers_url":"https://api.github.com/users/niketa-webonise/followers","following_url":"https://api.github.com/users/niketa-webonise/following{/other_user}","gists_url":"https://api.github.com/users/niketa-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/niketa-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niketa-webonise/subscriptions","organizations_url":"https://api.github.com/users/niketa-webonise/orgs","repos_url":"https://api.github.com/users/niketa-webonise/repos","events_url":"https://api.github.com/users/niketa-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/niketa-webonise/received_events","type":"User","site_admin":false},"repo":{"id":134812563,"name":"gror","full_name":"niketa-webonise/gror","owner":{"login":"niketa-webonise","id":36664544,"avatar_url":"https://avatars1.githubusercontent.com/u/36664544?v=4","gravatar_id":"","url":"https://api.github.com/users/niketa-webonise","html_url":"https://github.com/niketa-webonise","followers_url":"https://api.github.com/users/niketa-webonise/followers","following_url":"https://api.github.com/users/niketa-webonise/following{/other_user}","gists_url":"https://api.github.com/users/niketa-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/niketa-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niketa-webonise/subscriptions","organizations_url":"https://api.github.com/users/niketa-webonise/orgs","repos_url":"https://api.github.com/users/niketa-webonise/repos","events_url":"https://api.github.com/users/niketa-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/niketa-webonise/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/niketa-webonise/gror","description":null,"fork":false,"url":"https://api.github.com/repos/niketa-webonise/gror","forks_url":"https://api.github.com/repos/niketa-webonise/gror/forks","keys_url":"https://api.github.com/repos/niketa-webonise/gror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niketa-webonise/gror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niketa-webonise/gror/teams","hooks_url":"https://api.github.com/repos/niketa-webonise/gror/hooks","issue_events_url":"https://api.github.com/repos/niketa-webonise/gror/issues/events{/number}","events_url":"https://api.github.com/repos/niketa-webonise/gror/events","assignees_url":"https://api.github.com/repos/niketa-webonise/gror/assignees{/user}","branches_url":"https://api.github.com/repos/niketa-webonise/gror/branches{/branch}","tags_url":"https://api.github.com/repos/niketa-webonise/gror/tags","blobs_url":"https://api.github.com/repos/niketa-webonise/gror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niketa-webonise/gror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niketa-webonise/gror/git/refs{/sha}","trees_url":"https://api.github.com/repos/niketa-webonise/gror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niketa-webonise/gror/statuses/{sha}","languages_url":"https://api.github.com/repos/niketa-webonise/gror/languages","stargazers_url":"https://api.github.com/repos/niketa-webonise/gror/stargazers","contributors_url":"https://api.github.com/repos/niketa-webonise/gror/contributors","subscribers_url":"https://api.github.com/repos/niketa-webonise/gror/subscribers","subscription_url":"https://api.github.com/repos/niketa-webonise/gror/subscription","commits_url":"https://api.github.com/repos/niketa-webonise/gror/commits{/sha}","git_commits_url":"https://api.github.com/repos/niketa-webonise/gror/git/commits{/sha}","comments_url":"https://api.github.com/repos/niketa-webonise/gror/comments{/number}","issue_comment_url":"https://api.github.com/repos/niketa-webonise/gror/issues/comments{/number}","contents_url":"https://api.github.com/repos/niketa-webonise/gror/contents/{+path}","compare_url":"https://api.github.com/repos/niketa-webonise/gror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niketa-webonise/gror/merges","archive_url":"https://api.github.com/repos/niketa-webonise/gror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niketa-webonise/gror/downloads","issues_url":"https://api.github.com/repos/niketa-webonise/gror/issues{/number}","pulls_url":"https://api.github.com/repos/niketa-webonise/gror/pulls{/number}","milestones_url":"https://api.github.com/repos/niketa-webonise/gror/milestones{/number}","notifications_url":"https://api.github.com/repos/niketa-webonise/gror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niketa-webonise/gror/labels{/name}","releases_url":"https://api.github.com/repos/niketa-webonise/gror/releases{/id}","deployments_url":"https://api.github.com/repos/niketa-webonise/gror/deployments","created_at":"2018-05-25T06:23:18Z","updated_at":"2018-05-25T06:23:20Z","pushed_at":"2018-05-28T08:34:42Z","git_url":"git://github.com/niketa-webonise/gror.git","ssh_url":"git@github.com:niketa-webonise/gror.git","clone_url":"https://github.com/niketa-webonise/gror.git","svn_url":"https://github.com/niketa-webonise/gror","homepage":null,"size":12,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"niketa-webonise:develop","ref":"develop","sha":"ffb7d5360f585cb1a947e53ab6cc2cbbadac1c9e","user":{"login":"niketa-webonise","id":36664544,"avatar_url":"https://avatars1.githubusercontent.com/u/36664544?v=4","gravatar_id":"","url":"https://api.github.com/users/niketa-webonise","html_url":"https://github.com/niketa-webonise","followers_url":"https://api.github.com/users/niketa-webonise/followers","following_url":"https://api.github.com/users/niketa-webonise/following{/other_user}","gists_url":"https://api.github.com/users/niketa-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/niketa-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niketa-webonise/subscriptions","organizations_url":"https://api.github.com/users/niketa-webonise/orgs","repos_url":"https://api.github.com/users/niketa-webonise/repos","events_url":"https://api.github.com/users/niketa-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/niketa-webonise/received_events","type":"User","site_admin":false},"repo":{"id":134812563,"name":"gror","full_name":"niketa-webonise/gror","owner":{"login":"niketa-webonise","id":36664544,"avatar_url":"https://avatars1.githubusercontent.com/u/36664544?v=4","gravatar_id":"","url":"https://api.github.com/users/niketa-webonise","html_url":"https://github.com/niketa-webonise","followers_url":"https://api.github.com/users/niketa-webonise/followers","following_url":"https://api.github.com/users/niketa-webonise/following{/other_user}","gists_url":"https://api.github.com/users/niketa-webonise/gists{/gist_id}","starred_url":"https://api.github.com/users/niketa-webonise/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niketa-webonise/subscriptions","organizations_url":"https://api.github.com/users/niketa-webonise/orgs","repos_url":"https://api.github.com/users/niketa-webonise/repos","events_url":"https://api.github.com/users/niketa-webonise/events{/privacy}","received_events_url":"https://api.github.com/users/niketa-webonise/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/niketa-webonise/gror","description":null,"fork":false,"url":"https://api.github.com/repos/niketa-webonise/gror","forks_url":"https://api.github.com/repos/niketa-webonise/gror/forks","keys_url":"https://api.github.com/repos/niketa-webonise/gror/keys{/key_id}","collaborators_url":"https://api.github.com/repos/niketa-webonise/gror/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/niketa-webonise/gror/teams","hooks_url":"https://api.github.com/repos/niketa-webonise/gror/hooks","issue_events_url":"https://api.github.com/repos/niketa-webonise/gror/issues/events{/number}","events_url":"https://api.github.com/repos/niketa-webonise/gror/events","assignees_url":"https://api.github.com/repos/niketa-webonise/gror/assignees{/user}","branches_url":"https://api.github.com/repos/niketa-webonise/gror/branches{/branch}","tags_url":"https://api.github.com/repos/niketa-webonise/gror/tags","blobs_url":"https://api.github.com/repos/niketa-webonise/gror/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/niketa-webonise/gror/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/niketa-webonise/gror/git/refs{/sha}","trees_url":"https://api.github.com/repos/niketa-webonise/gror/git/trees{/sha}","statuses_url":"https://api.github.com/repos/niketa-webonise/gror/statuses/{sha}","languages_url":"https://api.github.com/repos/niketa-webonise/gror/languages","stargazers_url":"https://api.github.com/repos/niketa-webonise/gror/stargazers","contributors_url":"https://api.github.com/repos/niketa-webonise/gror/contributors","subscribers_url":"https://api.github.com/repos/niketa-webonise/gror/subscribers","subscription_url":"https://api.github.com/repos/niketa-webonise/gror/subscription","commits_url":"https://api.github.com/repos/niketa-webonise/gror/commits{/sha}","git_commits_url":"https://api.github.com/repos/niketa-webonise/gror/git/commits{/sha}","comments_url":"https://api.github.com/repos/niketa-webonise/gror/comments{/number}","issue_comment_url":"https://api.github.com/repos/niketa-webonise/gror/issues/comments{/number}","contents_url":"https://api.github.com/repos/niketa-webonise/gror/contents/{+path}","compare_url":"https://api.github.com/repos/niketa-webonise/gror/compare/{base}...{head}","merges_url":"https://api.github.com/repos/niketa-webonise/gror/merges","archive_url":"https://api.github.com/repos/niketa-webonise/gror/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/niketa-webonise/gror/downloads","issues_url":"https://api.github.com/repos/niketa-webonise/gror/issues{/number}","pulls_url":"https://api.github.com/repos/niketa-webonise/gror/pulls{/number}","milestones_url":"https://api.github.com/repos/niketa-webonise/gror/milestones{/number}","notifications_url":"https://api.github.com/repos/niketa-webonise/gror/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/niketa-webonise/gror/labels{/name}","releases_url":"https://api.github.com/repos/niketa-webonise/gror/releases{/id}","deployments_url":"https://api.github.com/repos/niketa-webonise/gror/deployments","created_at":"2018-05-25T06:23:18Z","updated_at":"2018-05-25T06:23:20Z","pushed_at":"2018-05-28T08:34:42Z","git_url":"git://github.com/niketa-webonise/gror.git","ssh_url":"git@github.com:niketa-webonise/gror.git","clone_url":"https://github.com/niketa-webonise/gror.git","svn_url":"https://github.com/niketa-webonise/gror","homepage":null,"size":12,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/niketa-webonise/gror/pulls/1"},"html":{"href":"https://github.com/niketa-webonise/gror/pull/1"},"issue":{"href":"https://api.github.com/repos/niketa-webonise/gror/issues/1"},"comments":{"href":"https://api.github.com/repos/niketa-webonise/gror/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/niketa-webonise/gror/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/niketa-webonise/gror/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/niketa-webonise/gror/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/niketa-webonise/gror/statuses/851351fb155638535da06f4ec7955e4653576220"}},"author_association":"OWNER"}}
{"actor":{"display_login":"naveen-webonise"}}