{"action":"created","comment":{"url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/comments/207082840","pull_request_review_id":142622228,"id":207082840,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzA4Mjg0MA==","diff_hunk":"@@ -0,0 +1,73 @@\n+document.addEventListener('DOMContentLoaded', () =>{\n+    fetchManager({\n+      url: '/api/categories',\n+      method: 'GET',\n+      headers: { 'content-type': 'application/json'},\n+      callback: appendAnswer\n+    });\n+}, false);\n+\n+const appendAnswer = (data) => {\n+  const outer = ({name}, subMenu) => `<li> <a href=\"#\">${name}</a><ul class=\"sub-menu\"> ${subMenu} </ul></li>`;\n+  const inner = ({name})=> `<li><a href=\"#\">${name}</a></li>`;\n+\n+  let resultHTML = data.reduce( function(p,c){\n+    return p + outer(c, c.children.map((e)=> inner(e)).join());}, \"\");\n+  $(\"#nav-menu\").insertAdjacentHTML('afterbegin', resultHTML);\n+}\n+\n+const addAllEvent = () => {\n+    registClickEvent($(\".bm-icon.spr-btn-arrow-main-slide.prev\"), movePrevious);\n+    registClickEvent($(\".bm-icon.spr-btn-arrow-main-slide.next\"), moveNext);\n+    Array.from($('#promotion-dot-box').children).forEach(child => registClickEvent(child, moveByDot));\n+};\n+\n+const registClickEvent = (target, whatToDo) => {\n+    target.addEventListener(\"click\", (event) => {\n+        event.preventDefault();\n+        whatToDo();\n+    });\n+};\n+\n+const change = (target, className, callback) => {\n+    const current = $(target);\n+    const next = callback(current);\n+    current.classList.toggle(className, false);\n+    next.classList.toggle(className, true);\n+};\n+\n+const movePrevious = () => {\n+    change(\".current\", \"current\", previousSibling);\n+\n+    change(\"#promotion-dot-box .on\", \"on\", previousSibling);\n+};\n+\n+const moveNext = () => {\n+    change(\".current\", \"current\", nextSibling);\n+\n+    change(\"#promotion-dot-box .on\", \"on\", nextSibling);\n+};\n+\n+const previousSibling = (element) => {\n+    return element.previousElementSibling || element.parentNode.lastElementChild;\n+};\n+\n+const nextSibling = (element) => {\n+    return element.nextElementSibling || element.parentNode.firstElementChild;\n+};\n+\n+const getEventTarget = () => {\n+    return event.target;\n+}\n+\n+const moveByDot = () => {\n+    change('#promotion-dot-box .on', 'on', getEventTarget);","path":"src/main/resources/static/js/main.js","position":64,"original_position":64,"commit_id":"6213407ac7c33b7017060f60e109a7a2f5adf180","original_commit_id":"6213407ac7c33b7017060f60e109a7a2f5adf180","user":{"login":"nigayo","id":1456761,"node_id":"MDQ6VXNlcjE0NTY3NjE=","avatar_url":"https://avatars2.githubusercontent.com/u/1456761?v=4","gravatar_id":"","url":"https://api.github.com/users/nigayo","html_url":"https://github.com/nigayo","followers_url":"https://api.github.com/users/nigayo/followers","following_url":"https://api.github.com/users/nigayo/following{/other_user}","gists_url":"https://api.github.com/users/nigayo/gists{/gist_id}","starred_url":"https://api.github.com/users/nigayo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nigayo/subscriptions","organizations_url":"https://api.github.com/users/nigayo/orgs","repos_url":"https://api.github.com/users/nigayo/repos","events_url":"https://api.github.com/users/nigayo/events{/privacy}","received_events_url":"https://api.github.com/users/nigayo/received_events","type":"User","site_admin":false},"body":"이 함수도 너무 이름이 구체적이지 않네요.\r\n","created_at":"2018-08-02T02:02:15Z","updated_at":"2018-08-02T02:04:17Z","html_url":"https://github.com/wwh-techcamp-2018/baeminchan/pull/45#discussion_r207082840","pull_request_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/45","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/comments/207082840"},"html":{"href":"https://github.com/wwh-techcamp-2018/baeminchan/pull/45#discussion_r207082840"},"pull_request":{"href":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/45"}}},"pull_request":{"url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/45","id":205414207,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA1NDE0MjA3","html_url":"https://github.com/wwh-techcamp-2018/baeminchan/pull/45","diff_url":"https://github.com/wwh-techcamp-2018/baeminchan/pull/45.diff","patch_url":"https://github.com/wwh-techcamp-2018/baeminchan/pull/45.patch","issue_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/issues/45","number":45,"state":"open","locked":false,"title":"[Team8 pair1] Step3 프론트 요구사항 구현","user":{"login":"urbanscenery","id":25319263,"node_id":"MDQ6VXNlcjI1MzE5MjYz","avatar_url":"https://avatars2.githubusercontent.com/u/25319263?v=4","gravatar_id":"","url":"https://api.github.com/users/urbanscenery","html_url":"https://github.com/urbanscenery","followers_url":"https://api.github.com/users/urbanscenery/followers","following_url":"https://api.github.com/users/urbanscenery/following{/other_user}","gists_url":"https://api.github.com/users/urbanscenery/gists{/gist_id}","starred_url":"https://api.github.com/users/urbanscenery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/urbanscenery/subscriptions","organizations_url":"https://api.github.com/users/urbanscenery/orgs","repos_url":"https://api.github.com/users/urbanscenery/repos","events_url":"https://api.github.com/users/urbanscenery/events{/privacy}","received_events_url":"https://api.github.com/users/urbanscenery/received_events","type":"User","site_admin":false},"body":"백엔드부분 제외하고 프론트부분만 구현완료했습니다. 코드리뷰 부탁드립니다!","created_at":"2018-08-01T12:50:02Z","updated_at":"2018-08-02T02:04:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"639f4eca56e6afac22de853f609fa779d9053ff8","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/45/commits","review_comments_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/45/comments","review_comment_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/issues/45/comments","statuses_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/statuses/6213407ac7c33b7017060f60e109a7a2f5adf180","head":{"label":"Woowahan2nd8:pair1_step3","ref":"pair1_step3","sha":"6213407ac7c33b7017060f60e109a7a2f5adf180","user":{"login":"Woowahan2nd8","id":40754299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwNzU0Mjk5","avatar_url":"https://avatars3.githubusercontent.com/u/40754299?v=4","gravatar_id":"","url":"https://api.github.com/users/Woowahan2nd8","html_url":"https://github.com/Woowahan2nd8","followers_url":"https://api.github.com/users/Woowahan2nd8/followers","following_url":"https://api.github.com/users/Woowahan2nd8/following{/other_user}","gists_url":"https://api.github.com/users/Woowahan2nd8/gists{/gist_id}","starred_url":"https://api.github.com/users/Woowahan2nd8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Woowahan2nd8/subscriptions","organizations_url":"https://api.github.com/users/Woowahan2nd8/orgs","repos_url":"https://api.github.com/users/Woowahan2nd8/repos","events_url":"https://api.github.com/users/Woowahan2nd8/events{/privacy}","received_events_url":"https://api.github.com/users/Woowahan2nd8/received_events","type":"Organization","site_admin":false},"repo":{"id":141964114,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE5NjQxMTQ=","name":"baeminchan","full_name":"Woowahan2nd8/baeminchan","owner":{"login":"Woowahan2nd8","id":40754299,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwNzU0Mjk5","avatar_url":"https://avatars3.githubusercontent.com/u/40754299?v=4","gravatar_id":"","url":"https://api.github.com/users/Woowahan2nd8","html_url":"https://github.com/Woowahan2nd8","followers_url":"https://api.github.com/users/Woowahan2nd8/followers","following_url":"https://api.github.com/users/Woowahan2nd8/following{/other_user}","gists_url":"https://api.github.com/users/Woowahan2nd8/gists{/gist_id}","starred_url":"https://api.github.com/users/Woowahan2nd8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Woowahan2nd8/subscriptions","organizations_url":"https://api.github.com/users/Woowahan2nd8/orgs","repos_url":"https://api.github.com/users/Woowahan2nd8/repos","events_url":"https://api.github.com/users/Woowahan2nd8/events{/privacy}","received_events_url":"https://api.github.com/users/Woowahan2nd8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Woowahan2nd8/baeminchan","description":"배민찬 서비스","fork":true,"url":"https://api.github.com/repos/Woowahan2nd8/baeminchan","forks_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/forks","keys_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/teams","hooks_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/hooks","issue_events_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/issues/events{/number}","events_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/events","assignees_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/assignees{/user}","branches_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/branches{/branch}","tags_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/tags","blobs_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/git/refs{/sha}","trees_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/statuses/{sha}","languages_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/languages","stargazers_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/stargazers","contributors_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/contributors","subscribers_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/subscribers","subscription_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/subscription","commits_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/commits{/sha}","git_commits_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/git/commits{/sha}","comments_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/comments{/number}","issue_comment_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/issues/comments{/number}","contents_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/contents/{+path}","compare_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/merges","archive_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/downloads","issues_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/issues{/number}","pulls_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/pulls{/number}","milestones_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/milestones{/number}","notifications_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/labels{/name}","releases_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/releases{/id}","deployments_url":"https://api.github.com/repos/Woowahan2nd8/baeminchan/deployments","created_at":"2018-07-23T05:10:36Z","updated_at":"2018-07-23T05:10:38Z","pushed_at":"2018-08-01T12:43:00Z","git_url":"git://github.com/Woowahan2nd8/baeminchan.git","ssh_url":"git@github.com:Woowahan2nd8/baeminchan.git","clone_url":"https://github.com/Woowahan2nd8/baeminchan.git","svn_url":"https://github.com/Woowahan2nd8/baeminchan","homepage":null,"size":1244,"stargazers_count":0,"watchers_count":0,"language":"HTML","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wwh-techcamp-2018:team8_pair1","ref":"team8_pair1","sha":"798bec3108f757c0e9ae346557db7096f8f1858d","user":{"login":"wwh-techcamp-2018","id":40353008,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzUzMDA4","avatar_url":"https://avatars1.githubusercontent.com/u/40353008?v=4","gravatar_id":"","url":"https://api.github.com/users/wwh-techcamp-2018","html_url":"https://github.com/wwh-techcamp-2018","followers_url":"https://api.github.com/users/wwh-techcamp-2018/followers","following_url":"https://api.github.com/users/wwh-techcamp-2018/following{/other_user}","gists_url":"https://api.github.com/users/wwh-techcamp-2018/gists{/gist_id}","starred_url":"https://api.github.com/users/wwh-techcamp-2018/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwh-techcamp-2018/subscriptions","organizations_url":"https://api.github.com/users/wwh-techcamp-2018/orgs","repos_url":"https://api.github.com/users/wwh-techcamp-2018/repos","events_url":"https://api.github.com/users/wwh-techcamp-2018/events{/privacy}","received_events_url":"https://api.github.com/users/wwh-techcamp-2018/received_events","type":"Organization","site_admin":false},"repo":{"id":137850607,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc4NTA2MDc=","name":"baeminchan","full_name":"wwh-techcamp-2018/baeminchan","owner":{"login":"wwh-techcamp-2018","id":40353008,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMzUzMDA4","avatar_url":"https://avatars1.githubusercontent.com/u/40353008?v=4","gravatar_id":"","url":"https://api.github.com/users/wwh-techcamp-2018","html_url":"https://github.com/wwh-techcamp-2018","followers_url":"https://api.github.com/users/wwh-techcamp-2018/followers","following_url":"https://api.github.com/users/wwh-techcamp-2018/following{/other_user}","gists_url":"https://api.github.com/users/wwh-techcamp-2018/gists{/gist_id}","starred_url":"https://api.github.com/users/wwh-techcamp-2018/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wwh-techcamp-2018/subscriptions","organizations_url":"https://api.github.com/users/wwh-techcamp-2018/orgs","repos_url":"https://api.github.com/users/wwh-techcamp-2018/repos","events_url":"https://api.github.com/users/wwh-techcamp-2018/events{/privacy}","received_events_url":"https://api.github.com/users/wwh-techcamp-2018/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wwh-techcamp-2018/baeminchan","description":"배민찬 서비스","fork":false,"url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan","forks_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/forks","keys_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/teams","hooks_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/hooks","issue_events_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/issues/events{/number}","events_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/events","assignees_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/assignees{/user}","branches_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/branches{/branch}","tags_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/tags","blobs_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/git/refs{/sha}","trees_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/statuses/{sha}","languages_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/languages","stargazers_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/stargazers","contributors_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/contributors","subscribers_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/subscribers","subscription_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/subscription","commits_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/commits{/sha}","git_commits_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/git/commits{/sha}","comments_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/comments{/number}","issue_comment_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/issues/comments{/number}","contents_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/contents/{+path}","compare_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/merges","archive_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/downloads","issues_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/issues{/number}","pulls_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls{/number}","milestones_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/milestones{/number}","notifications_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/labels{/name}","releases_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/releases{/id}","deployments_url":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/deployments","created_at":"2018-06-19T06:40:21Z","updated_at":"2018-07-25T09:51:26Z","pushed_at":"2018-08-02T01:55:10Z","git_url":"git://github.com/wwh-techcamp-2018/baeminchan.git","ssh_url":"git@github.com:wwh-techcamp-2018/baeminchan.git","clone_url":"https://github.com/wwh-techcamp-2018/baeminchan.git","svn_url":"https://github.com/wwh-techcamp-2018/baeminchan","homepage":null,"size":1681,"stargazers_count":4,"watchers_count":4,"language":"HTML","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"open_issues_count":2,"license":null,"forks":30,"open_issues":2,"watchers":4,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/45"},"html":{"href":"https://github.com/wwh-techcamp-2018/baeminchan/pull/45"},"issue":{"href":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/issues/45"},"comments":{"href":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/issues/45/comments"},"review_comments":{"href":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/45/comments"},"review_comment":{"href":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/pulls/45/commits"},"statuses":{"href":"https://api.github.com/repos/wwh-techcamp-2018/baeminchan/statuses/6213407ac7c33b7017060f60e109a7a2f5adf180"}},"author_association":"NONE"}}
{"actor":{"display_login":"nigayo"}}