{"action":"created","comment":{"url":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/comments/146430282","pull_request_review_id":71370661,"id":146430282,"diff_hunk":"@@ -3,10 +3,12 @@ import jwt from 'jsonwebtoken'\n const verification = (req, res, next) => {\n   try {\n     const jwtToken = req.get('Authorization')\n-    // const decode = jwt.verify(jwtToken, process.env.JWT_SECRET)\n-    jwt.verify(jwtToken, process.env.JWT_SECRET)\n+    const decode = jwt.verify(jwtToken, process.env.JWT_SECRET)\n+\n+    res.locals.userID = decode.id\n     return next()\n   } catch (errMsg) {\n+    console.error(errMsg)\n     return res.status(401).json('沒有權限使用這個API')\n   }\n }","path":"src/restAPI/auth.js","position":14,"original_position":14,"commit_id":"8a0343e8add3f3e12bf325c2c26e3540beeddfd5","original_commit_id":"fb48026f7c812a543351c92e405d4c620fe09318","user":{"login":"lulalachen","id":7125101,"avatar_url":"https://avatars0.githubusercontent.com/u/7125101?v=4","gravatar_id":"","url":"https://api.github.com/users/lulalachen","html_url":"https://github.com/lulalachen","followers_url":"https://api.github.com/users/lulalachen/followers","following_url":"https://api.github.com/users/lulalachen/following{/other_user}","gists_url":"https://api.github.com/users/lulalachen/gists{/gist_id}","starred_url":"https://api.github.com/users/lulalachen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lulalachen/subscriptions","organizations_url":"https://api.github.com/users/lulalachen/orgs","repos_url":"https://api.github.com/users/lulalachen/repos","events_url":"https://api.github.com/users/lulalachen/events{/privacy}","received_events_url":"https://api.github.com/users/lulalachen/received_events","type":"User","site_admin":false},"body":"這邊只有一個function\r\n應該可以直接 `export default verification`","created_at":"2017-10-24T00:46:12Z","updated_at":"2017-10-24T00:51:26Z","html_url":"https://github.com/Inbound-Tech/inbound-server/pull/4#discussion_r146430282","pull_request_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/4","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/comments/146430282"},"html":{"href":"https://github.com/Inbound-Tech/inbound-server/pull/4#discussion_r146430282"},"pull_request":{"href":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/4"}}},"pull_request":{"url":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/4","id":145279540,"html_url":"https://github.com/Inbound-Tech/inbound-server/pull/4","diff_url":"https://github.com/Inbound-Tech/inbound-server/pull/4.diff","patch_url":"https://github.com/Inbound-Tech/inbound-server/pull/4.patch","issue_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/issues/4","number":4,"state":"open","locked":false,"title":"Excel parser","user":{"login":"jyunhan","id":9321085,"avatar_url":"https://avatars0.githubusercontent.com/u/9321085?v=4","gravatar_id":"","url":"https://api.github.com/users/jyunhan","html_url":"https://github.com/jyunhan","followers_url":"https://api.github.com/users/jyunhan/followers","following_url":"https://api.github.com/users/jyunhan/following{/other_user}","gists_url":"https://api.github.com/users/jyunhan/gists{/gist_id}","starred_url":"https://api.github.com/users/jyunhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jyunhan/subscriptions","organizations_url":"https://api.github.com/users/jyunhan/orgs","repos_url":"https://api.github.com/users/jyunhan/repos","events_url":"https://api.github.com/users/jyunhan/events{/privacy}","received_events_url":"https://api.github.com/users/jyunhan/received_events","type":"User","site_admin":false},"body":"1. choice parser support column range: A-Z\r\n* regexp result didn't support column after AA... )\r\n\r\n2. prefix, sec_, means the sheet belongs to question section.\r\n3. suffix, _info, means the sheet belongs to question info.\r\n4. suffix, _note, means the sheet is the workbook memo, no need to parser.","created_at":"2017-10-07T06:24:04Z","updated_at":"2017-10-24T00:51:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a78f4da9cb145f23acfcf07fb6490f248e856d02","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/issues/4/comments","statuses_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/statuses/8a0343e8add3f3e12bf325c2c26e3540beeddfd5","head":{"label":"Inbound-Tech:excel_parser","ref":"excel_parser","sha":"8a0343e8add3f3e12bf325c2c26e3540beeddfd5","user":{"login":"Inbound-Tech","id":30797086,"avatar_url":"https://avatars2.githubusercontent.com/u/30797086?v=4","gravatar_id":"","url":"https://api.github.com/users/Inbound-Tech","html_url":"https://github.com/Inbound-Tech","followers_url":"https://api.github.com/users/Inbound-Tech/followers","following_url":"https://api.github.com/users/Inbound-Tech/following{/other_user}","gists_url":"https://api.github.com/users/Inbound-Tech/gists{/gist_id}","starred_url":"https://api.github.com/users/Inbound-Tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inbound-Tech/subscriptions","organizations_url":"https://api.github.com/users/Inbound-Tech/orgs","repos_url":"https://api.github.com/users/Inbound-Tech/repos","events_url":"https://api.github.com/users/Inbound-Tech/events{/privacy}","received_events_url":"https://api.github.com/users/Inbound-Tech/received_events","type":"Organization","site_admin":false},"repo":{"id":99888547,"name":"inbound-server","full_name":"Inbound-Tech/inbound-server","owner":{"login":"Inbound-Tech","id":30797086,"avatar_url":"https://avatars2.githubusercontent.com/u/30797086?v=4","gravatar_id":"","url":"https://api.github.com/users/Inbound-Tech","html_url":"https://github.com/Inbound-Tech","followers_url":"https://api.github.com/users/Inbound-Tech/followers","following_url":"https://api.github.com/users/Inbound-Tech/following{/other_user}","gists_url":"https://api.github.com/users/Inbound-Tech/gists{/gist_id}","starred_url":"https://api.github.com/users/Inbound-Tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inbound-Tech/subscriptions","organizations_url":"https://api.github.com/users/Inbound-Tech/orgs","repos_url":"https://api.github.com/users/Inbound-Tech/repos","events_url":"https://api.github.com/users/Inbound-Tech/events{/privacy}","received_events_url":"https://api.github.com/users/Inbound-Tech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Inbound-Tech/inbound-server","description":null,"fork":false,"url":"https://api.github.com/repos/Inbound-Tech/inbound-server","forks_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/forks","keys_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/teams","hooks_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/hooks","issue_events_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/issues/events{/number}","events_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/events","assignees_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/assignees{/user}","branches_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/branches{/branch}","tags_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/tags","blobs_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/statuses/{sha}","languages_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/languages","stargazers_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/stargazers","contributors_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/contributors","subscribers_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/subscribers","subscription_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/subscription","commits_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/contents/{+path}","compare_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/merges","archive_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/downloads","issues_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/issues{/number}","pulls_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls{/number}","milestones_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/milestones{/number}","notifications_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/labels{/name}","releases_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/releases{/id}","deployments_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/deployments","created_at":"2017-08-10T06:21:34Z","updated_at":"2017-08-10T06:32:33Z","pushed_at":"2017-10-21T19:41:34Z","git_url":"git://github.com/Inbound-Tech/inbound-server.git","ssh_url":"git@github.com:Inbound-Tech/inbound-server.git","clone_url":"https://github.com/Inbound-Tech/inbound-server.git","svn_url":"https://github.com/Inbound-Tech/inbound-server","homepage":null,"size":371,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Inbound-Tech:master","ref":"master","sha":"b3d462223213b5bbf67647cae8d61654464ebee4","user":{"login":"Inbound-Tech","id":30797086,"avatar_url":"https://avatars2.githubusercontent.com/u/30797086?v=4","gravatar_id":"","url":"https://api.github.com/users/Inbound-Tech","html_url":"https://github.com/Inbound-Tech","followers_url":"https://api.github.com/users/Inbound-Tech/followers","following_url":"https://api.github.com/users/Inbound-Tech/following{/other_user}","gists_url":"https://api.github.com/users/Inbound-Tech/gists{/gist_id}","starred_url":"https://api.github.com/users/Inbound-Tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inbound-Tech/subscriptions","organizations_url":"https://api.github.com/users/Inbound-Tech/orgs","repos_url":"https://api.github.com/users/Inbound-Tech/repos","events_url":"https://api.github.com/users/Inbound-Tech/events{/privacy}","received_events_url":"https://api.github.com/users/Inbound-Tech/received_events","type":"Organization","site_admin":false},"repo":{"id":99888547,"name":"inbound-server","full_name":"Inbound-Tech/inbound-server","owner":{"login":"Inbound-Tech","id":30797086,"avatar_url":"https://avatars2.githubusercontent.com/u/30797086?v=4","gravatar_id":"","url":"https://api.github.com/users/Inbound-Tech","html_url":"https://github.com/Inbound-Tech","followers_url":"https://api.github.com/users/Inbound-Tech/followers","following_url":"https://api.github.com/users/Inbound-Tech/following{/other_user}","gists_url":"https://api.github.com/users/Inbound-Tech/gists{/gist_id}","starred_url":"https://api.github.com/users/Inbound-Tech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Inbound-Tech/subscriptions","organizations_url":"https://api.github.com/users/Inbound-Tech/orgs","repos_url":"https://api.github.com/users/Inbound-Tech/repos","events_url":"https://api.github.com/users/Inbound-Tech/events{/privacy}","received_events_url":"https://api.github.com/users/Inbound-Tech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Inbound-Tech/inbound-server","description":null,"fork":false,"url":"https://api.github.com/repos/Inbound-Tech/inbound-server","forks_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/forks","keys_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/teams","hooks_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/hooks","issue_events_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/issues/events{/number}","events_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/events","assignees_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/assignees{/user}","branches_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/branches{/branch}","tags_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/tags","blobs_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/git/refs{/sha}","trees_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/statuses/{sha}","languages_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/languages","stargazers_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/stargazers","contributors_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/contributors","subscribers_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/subscribers","subscription_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/subscription","commits_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/commits{/sha}","git_commits_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/git/commits{/sha}","comments_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/comments{/number}","issue_comment_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/issues/comments{/number}","contents_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/contents/{+path}","compare_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/merges","archive_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/downloads","issues_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/issues{/number}","pulls_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls{/number}","milestones_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/milestones{/number}","notifications_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/labels{/name}","releases_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/releases{/id}","deployments_url":"https://api.github.com/repos/Inbound-Tech/inbound-server/deployments","created_at":"2017-08-10T06:21:34Z","updated_at":"2017-08-10T06:32:33Z","pushed_at":"2017-10-21T19:41:34Z","git_url":"git://github.com/Inbound-Tech/inbound-server.git","ssh_url":"git@github.com:Inbound-Tech/inbound-server.git","clone_url":"https://github.com/Inbound-Tech/inbound-server.git","svn_url":"https://github.com/Inbound-Tech/inbound-server","homepage":null,"size":371,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/4"},"html":{"href":"https://github.com/Inbound-Tech/inbound-server/pull/4"},"issue":{"href":"https://api.github.com/repos/Inbound-Tech/inbound-server/issues/4"},"comments":{"href":"https://api.github.com/repos/Inbound-Tech/inbound-server/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Inbound-Tech/inbound-server/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Inbound-Tech/inbound-server/statuses/8a0343e8add3f3e12bf325c2c26e3540beeddfd5"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"lulalachen"}}