{"action":"created","comment":{"url":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/comments/221249881","pull_request_review_id":159855828,"id":221249881,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMTI0OTg4MQ==","diff_hunk":"@@ -65,4 +67,58 @@ def signup():\n @app.route('/logout')\n def logout():\n     logout_user()\n-    return redirect(url_for('login'))\n\\ No newline at end of file\n+    return redirect(url_for('login'))\n+\n+\n+@app.route(\"/upload\", methods=[\"POST\"])\n+def upload():\n+    '''\n+    This is the upload page. User can upload images.\n+    '''\n+    target = os.path.join(APP_ROOT, 'images/')\n+    # target = os.path.join(APP_ROOT, 'static/')\n+    print(target)\n+    if not os.path.isdir(target):\n+        os.mkdir(target)\n+    else:\n+        print(\"Couldn't create upload directory: {}\".format(target))","path":"app/routes.py","position":40,"original_position":40,"commit_id":"c0c389f98535805dfcaca3e825e37809ebd280e4","original_commit_id":"c0c389f98535805dfcaca3e825e37809ebd280e4","user":{"login":"QMeng","id":8785736,"node_id":"MDQ6VXNlcjg3ODU3MzY=","avatar_url":"https://avatars3.githubusercontent.com/u/8785736?v=4","gravatar_id":"","url":"https://api.github.com/users/QMeng","html_url":"https://github.com/QMeng","followers_url":"https://api.github.com/users/QMeng/followers","following_url":"https://api.github.com/users/QMeng/following{/other_user}","gists_url":"https://api.github.com/users/QMeng/gists{/gist_id}","starred_url":"https://api.github.com/users/QMeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QMeng/subscriptions","organizations_url":"https://api.github.com/users/QMeng/orgs","repos_url":"https://api.github.com/users/QMeng/repos","events_url":"https://api.github.com/users/QMeng/events{/privacy}","received_events_url":"https://api.github.com/users/QMeng/received_events","type":"User","site_admin":false},"body":"use flush for message handling. there are examples in this file.","created_at":"2018-09-28T13:21:15Z","updated_at":"2018-09-28T13:21:15Z","html_url":"https://github.com/QMeng/ECE1779A1/pull/2#discussion_r221249881","pull_request_url":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/2","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/comments/221249881"},"html":{"href":"https://github.com/QMeng/ECE1779A1/pull/2#discussion_r221249881"},"pull_request":{"href":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/2","id":218747894,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4NzQ3ODk0","html_url":"https://github.com/QMeng/ECE1779A1/pull/2","diff_url":"https://github.com/QMeng/ECE1779A1/pull/2.diff","patch_url":"https://github.com/QMeng/ECE1779A1/pull/2.patch","issue_url":"https://api.github.com/repos/QMeng/ECE1779A1/issues/2","number":2,"state":"open","locked":false,"title":"Lsh/upload","user":{"login":"liush1996","id":35778153,"node_id":"MDQ6VXNlcjM1Nzc4MTUz","avatar_url":"https://avatars0.githubusercontent.com/u/35778153?v=4","gravatar_id":"","url":"https://api.github.com/users/liush1996","html_url":"https://github.com/liush1996","followers_url":"https://api.github.com/users/liush1996/followers","following_url":"https://api.github.com/users/liush1996/following{/other_user}","gists_url":"https://api.github.com/users/liush1996/gists{/gist_id}","starred_url":"https://api.github.com/users/liush1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liush1996/subscriptions","organizations_url":"https://api.github.com/users/liush1996/orgs","repos_url":"https://api.github.com/users/liush1996/repos","events_url":"https://api.github.com/users/liush1996/events{/privacy}","received_events_url":"https://api.github.com/users/liush1996/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-09-27T18:31:00Z","updated_at":"2018-09-28T13:21:15Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0a1767d4fcfa330e17dda3c103b941d1334ac904","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/2/commits","review_comments_url":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/2/comments","review_comment_url":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/comments{/number}","comments_url":"https://api.github.com/repos/QMeng/ECE1779A1/issues/2/comments","statuses_url":"https://api.github.com/repos/QMeng/ECE1779A1/statuses/c0c389f98535805dfcaca3e825e37809ebd280e4","head":{"label":"QMeng:LSH/upload","ref":"LSH/upload","sha":"c0c389f98535805dfcaca3e825e37809ebd280e4","user":{"login":"QMeng","id":8785736,"node_id":"MDQ6VXNlcjg3ODU3MzY=","avatar_url":"https://avatars3.githubusercontent.com/u/8785736?v=4","gravatar_id":"","url":"https://api.github.com/users/QMeng","html_url":"https://github.com/QMeng","followers_url":"https://api.github.com/users/QMeng/followers","following_url":"https://api.github.com/users/QMeng/following{/other_user}","gists_url":"https://api.github.com/users/QMeng/gists{/gist_id}","starred_url":"https://api.github.com/users/QMeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QMeng/subscriptions","organizations_url":"https://api.github.com/users/QMeng/orgs","repos_url":"https://api.github.com/users/QMeng/repos","events_url":"https://api.github.com/users/QMeng/events{/privacy}","received_events_url":"https://api.github.com/users/QMeng/received_events","type":"User","site_admin":false},"repo":{"id":149529051,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk1MjkwNTE=","name":"ECE1779A1","full_name":"QMeng/ECE1779A1","private":false,"owner":{"login":"QMeng","id":8785736,"node_id":"MDQ6VXNlcjg3ODU3MzY=","avatar_url":"https://avatars3.githubusercontent.com/u/8785736?v=4","gravatar_id":"","url":"https://api.github.com/users/QMeng","html_url":"https://github.com/QMeng","followers_url":"https://api.github.com/users/QMeng/followers","following_url":"https://api.github.com/users/QMeng/following{/other_user}","gists_url":"https://api.github.com/users/QMeng/gists{/gist_id}","starred_url":"https://api.github.com/users/QMeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QMeng/subscriptions","organizations_url":"https://api.github.com/users/QMeng/orgs","repos_url":"https://api.github.com/users/QMeng/repos","events_url":"https://api.github.com/users/QMeng/events{/privacy}","received_events_url":"https://api.github.com/users/QMeng/received_events","type":"User","site_admin":false},"html_url":"https://github.com/QMeng/ECE1779A1","description":null,"fork":false,"url":"https://api.github.com/repos/QMeng/ECE1779A1","forks_url":"https://api.github.com/repos/QMeng/ECE1779A1/forks","keys_url":"https://api.github.com/repos/QMeng/ECE1779A1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QMeng/ECE1779A1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QMeng/ECE1779A1/teams","hooks_url":"https://api.github.com/repos/QMeng/ECE1779A1/hooks","issue_events_url":"https://api.github.com/repos/QMeng/ECE1779A1/issues/events{/number}","events_url":"https://api.github.com/repos/QMeng/ECE1779A1/events","assignees_url":"https://api.github.com/repos/QMeng/ECE1779A1/assignees{/user}","branches_url":"https://api.github.com/repos/QMeng/ECE1779A1/branches{/branch}","tags_url":"https://api.github.com/repos/QMeng/ECE1779A1/tags","blobs_url":"https://api.github.com/repos/QMeng/ECE1779A1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QMeng/ECE1779A1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QMeng/ECE1779A1/git/refs{/sha}","trees_url":"https://api.github.com/repos/QMeng/ECE1779A1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QMeng/ECE1779A1/statuses/{sha}","languages_url":"https://api.github.com/repos/QMeng/ECE1779A1/languages","stargazers_url":"https://api.github.com/repos/QMeng/ECE1779A1/stargazers","contributors_url":"https://api.github.com/repos/QMeng/ECE1779A1/contributors","subscribers_url":"https://api.github.com/repos/QMeng/ECE1779A1/subscribers","subscription_url":"https://api.github.com/repos/QMeng/ECE1779A1/subscription","commits_url":"https://api.github.com/repos/QMeng/ECE1779A1/commits{/sha}","git_commits_url":"https://api.github.com/repos/QMeng/ECE1779A1/git/commits{/sha}","comments_url":"https://api.github.com/repos/QMeng/ECE1779A1/comments{/number}","issue_comment_url":"https://api.github.com/repos/QMeng/ECE1779A1/issues/comments{/number}","contents_url":"https://api.github.com/repos/QMeng/ECE1779A1/contents/{+path}","compare_url":"https://api.github.com/repos/QMeng/ECE1779A1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QMeng/ECE1779A1/merges","archive_url":"https://api.github.com/repos/QMeng/ECE1779A1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QMeng/ECE1779A1/downloads","issues_url":"https://api.github.com/repos/QMeng/ECE1779A1/issues{/number}","pulls_url":"https://api.github.com/repos/QMeng/ECE1779A1/pulls{/number}","milestones_url":"https://api.github.com/repos/QMeng/ECE1779A1/milestones{/number}","notifications_url":"https://api.github.com/repos/QMeng/ECE1779A1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QMeng/ECE1779A1/labels{/name}","releases_url":"https://api.github.com/repos/QMeng/ECE1779A1/releases{/id}","deployments_url":"https://api.github.com/repos/QMeng/ECE1779A1/deployments","created_at":"2018-09-20T00:36:39Z","updated_at":"2018-09-27T19:37:45Z","pushed_at":"2018-09-27T19:37:43Z","git_url":"git://github.com/QMeng/ECE1779A1.git","ssh_url":"git@github.com:QMeng/ECE1779A1.git","clone_url":"https://github.com/QMeng/ECE1779A1.git","svn_url":"https://github.com/QMeng/ECE1779A1","homepage":null,"size":8053,"stargazers_count":0,"watchers_count":0,"language":"Python","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,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"QMeng:master","ref":"master","sha":"30708ed429d9054976efb2ba187022141e9fbd1c","user":{"login":"QMeng","id":8785736,"node_id":"MDQ6VXNlcjg3ODU3MzY=","avatar_url":"https://avatars3.githubusercontent.com/u/8785736?v=4","gravatar_id":"","url":"https://api.github.com/users/QMeng","html_url":"https://github.com/QMeng","followers_url":"https://api.github.com/users/QMeng/followers","following_url":"https://api.github.com/users/QMeng/following{/other_user}","gists_url":"https://api.github.com/users/QMeng/gists{/gist_id}","starred_url":"https://api.github.com/users/QMeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QMeng/subscriptions","organizations_url":"https://api.github.com/users/QMeng/orgs","repos_url":"https://api.github.com/users/QMeng/repos","events_url":"https://api.github.com/users/QMeng/events{/privacy}","received_events_url":"https://api.github.com/users/QMeng/received_events","type":"User","site_admin":false},"repo":{"id":149529051,"node_id":"MDEwOlJlcG9zaXRvcnkxNDk1MjkwNTE=","name":"ECE1779A1","full_name":"QMeng/ECE1779A1","private":false,"owner":{"login":"QMeng","id":8785736,"node_id":"MDQ6VXNlcjg3ODU3MzY=","avatar_url":"https://avatars3.githubusercontent.com/u/8785736?v=4","gravatar_id":"","url":"https://api.github.com/users/QMeng","html_url":"https://github.com/QMeng","followers_url":"https://api.github.com/users/QMeng/followers","following_url":"https://api.github.com/users/QMeng/following{/other_user}","gists_url":"https://api.github.com/users/QMeng/gists{/gist_id}","starred_url":"https://api.github.com/users/QMeng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/QMeng/subscriptions","organizations_url":"https://api.github.com/users/QMeng/orgs","repos_url":"https://api.github.com/users/QMeng/repos","events_url":"https://api.github.com/users/QMeng/events{/privacy}","received_events_url":"https://api.github.com/users/QMeng/received_events","type":"User","site_admin":false},"html_url":"https://github.com/QMeng/ECE1779A1","description":null,"fork":false,"url":"https://api.github.com/repos/QMeng/ECE1779A1","forks_url":"https://api.github.com/repos/QMeng/ECE1779A1/forks","keys_url":"https://api.github.com/repos/QMeng/ECE1779A1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/QMeng/ECE1779A1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/QMeng/ECE1779A1/teams","hooks_url":"https://api.github.com/repos/QMeng/ECE1779A1/hooks","issue_events_url":"https://api.github.com/repos/QMeng/ECE1779A1/issues/events{/number}","events_url":"https://api.github.com/repos/QMeng/ECE1779A1/events","assignees_url":"https://api.github.com/repos/QMeng/ECE1779A1/assignees{/user}","branches_url":"https://api.github.com/repos/QMeng/ECE1779A1/branches{/branch}","tags_url":"https://api.github.com/repos/QMeng/ECE1779A1/tags","blobs_url":"https://api.github.com/repos/QMeng/ECE1779A1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/QMeng/ECE1779A1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/QMeng/ECE1779A1/git/refs{/sha}","trees_url":"https://api.github.com/repos/QMeng/ECE1779A1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/QMeng/ECE1779A1/statuses/{sha}","languages_url":"https://api.github.com/repos/QMeng/ECE1779A1/languages","stargazers_url":"https://api.github.com/repos/QMeng/ECE1779A1/stargazers","contributors_url":"https://api.github.com/repos/QMeng/ECE1779A1/contributors","subscribers_url":"https://api.github.com/repos/QMeng/ECE1779A1/subscribers","subscription_url":"https://api.github.com/repos/QMeng/ECE1779A1/subscription","commits_url":"https://api.github.com/repos/QMeng/ECE1779A1/commits{/sha}","git_commits_url":"https://api.github.com/repos/QMeng/ECE1779A1/git/commits{/sha}","comments_url":"https://api.github.com/repos/QMeng/ECE1779A1/comments{/number}","issue_comment_url":"https://api.github.com/repos/QMeng/ECE1779A1/issues/comments{/number}","contents_url":"https://api.github.com/repos/QMeng/ECE1779A1/contents/{+path}","compare_url":"https://api.github.com/repos/QMeng/ECE1779A1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/QMeng/ECE1779A1/merges","archive_url":"https://api.github.com/repos/QMeng/ECE1779A1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/QMeng/ECE1779A1/downloads","issues_url":"https://api.github.com/repos/QMeng/ECE1779A1/issues{/number}","pulls_url":"https://api.github.com/repos/QMeng/ECE1779A1/pulls{/number}","milestones_url":"https://api.github.com/repos/QMeng/ECE1779A1/milestones{/number}","notifications_url":"https://api.github.com/repos/QMeng/ECE1779A1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/QMeng/ECE1779A1/labels{/name}","releases_url":"https://api.github.com/repos/QMeng/ECE1779A1/releases{/id}","deployments_url":"https://api.github.com/repos/QMeng/ECE1779A1/deployments","created_at":"2018-09-20T00:36:39Z","updated_at":"2018-09-27T19:37:45Z","pushed_at":"2018-09-27T19:37:43Z","git_url":"git://github.com/QMeng/ECE1779A1.git","ssh_url":"git@github.com:QMeng/ECE1779A1.git","clone_url":"https://github.com/QMeng/ECE1779A1.git","svn_url":"https://github.com/QMeng/ECE1779A1","homepage":null,"size":8053,"stargazers_count":0,"watchers_count":0,"language":"Python","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,"license":null,"forks":1,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/2"},"html":{"href":"https://github.com/QMeng/ECE1779A1/pull/2"},"issue":{"href":"https://api.github.com/repos/QMeng/ECE1779A1/issues/2"},"comments":{"href":"https://api.github.com/repos/QMeng/ECE1779A1/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/QMeng/ECE1779A1/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/QMeng/ECE1779A1/statuses/c0c389f98535805dfcaca3e825e37809ebd280e4"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"QMeng"}}