{"action":"created","comment":{"url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/comments/143899395","pull_request_review_id":68476049,"id":143899395,"diff_hunk":"@@ -0,0 +1,209 @@\n+'use strict';\n+const cryptoJs = require('./crypto.js');\n+let bodyParser = require('body-parser');\n+const express = require('express');\n+const url = 'mongodb://localhost:27017/epam';// already defined;\n+const app = express();\n+let mongodb = require('mongodb');\n+let MongoClient = mongodb.MongoClient;\n+app.use(bodyParser.json()); // for parsing application/json\n+app.use(bodyParser.urlencoded({extended: true}));\n+app.use(express.static('dist'));\n+app.get('/heartbeat', (req, res) => {\n+  res.json({status: 'ok'});\n+});\n+\n+\n+function usernameCheck(req, res, sendContent) {\n+  if (req.body.username.replace(' ', '') === '') {\n+    let obj = {\n+      'error': 'the username is void',\n+    };\n+    res.status(400).send(obj);","path":"src/server/checkUserInfo.js","position":22,"original_position":22,"commit_id":"32d0fdb5422d02666deb3b1b375b959c28d5587b","original_commit_id":"32d0fdb5422d02666deb3b1b375b959c28d5587b","user":{"login":"ikarasz","id":5849426,"avatar_url":"https://avatars2.githubusercontent.com/u/5849426?v=4","gravatar_id":"","url":"https://api.github.com/users/ikarasz","html_url":"https://github.com/ikarasz","followers_url":"https://api.github.com/users/ikarasz/followers","following_url":"https://api.github.com/users/ikarasz/following{/other_user}","gists_url":"https://api.github.com/users/ikarasz/gists{/gist_id}","starred_url":"https://api.github.com/users/ikarasz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ikarasz/subscriptions","organizations_url":"https://api.github.com/users/ikarasz/orgs","repos_url":"https://api.github.com/users/ikarasz/repos","events_url":"https://api.github.com/users/ikarasz/events{/privacy}","received_events_url":"https://api.github.com/users/ikarasz/received_events","type":"User","site_admin":false},"body":"set content-type or use res.json function","created_at":"2017-10-11T02:32:42Z","updated_at":"2017-10-11T02:37:51Z","html_url":"https://github.com/greenfox-academy/epam-jsa-opal/pull/21#discussion_r143899395","pull_request_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/21","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/comments/143899395"},"html":{"href":"https://github.com/greenfox-academy/epam-jsa-opal/pull/21#discussion_r143899395"},"pull_request":{"href":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/21","id":145640487,"html_url":"https://github.com/greenfox-academy/epam-jsa-opal/pull/21","diff_url":"https://github.com/greenfox-academy/epam-jsa-opal/pull/21.diff","patch_url":"https://github.com/greenfox-academy/epam-jsa-opal/pull/21.patch","issue_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/issues/21","number":21,"state":"open","locked":false,"title":"Opl 28","user":{"login":"haochenli","id":14314849,"avatar_url":"https://avatars3.githubusercontent.com/u/14314849?v=4","gravatar_id":"","url":"https://api.github.com/users/haochenli","html_url":"https://github.com/haochenli","followers_url":"https://api.github.com/users/haochenli/followers","following_url":"https://api.github.com/users/haochenli/following{/other_user}","gists_url":"https://api.github.com/users/haochenli/gists{/gist_id}","starred_url":"https://api.github.com/users/haochenli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/haochenli/subscriptions","organizations_url":"https://api.github.com/users/haochenli/orgs","repos_url":"https://api.github.com/users/haochenli/repos","events_url":"https://api.github.com/users/haochenli/events{/privacy}","received_events_url":"https://api.github.com/users/haochenli/received_events","type":"User","site_admin":false},"body":"signup api ready to go","created_at":"2017-10-10T09:27:55Z","updated_at":"2017-10-11T02:37:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/21/commits","review_comments_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/21/comments","review_comment_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/issues/21/comments","statuses_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/statuses/32d0fdb5422d02666deb3b1b375b959c28d5587b","head":{"label":"greenfox-academy:OPL_28","ref":"OPL_28","sha":"32d0fdb5422d02666deb3b1b375b959c28d5587b","user":{"login":"greenfox-academy","id":14247612,"avatar_url":"https://avatars2.githubusercontent.com/u/14247612?v=4","gravatar_id":"","url":"https://api.github.com/users/greenfox-academy","html_url":"https://github.com/greenfox-academy","followers_url":"https://api.github.com/users/greenfox-academy/followers","following_url":"https://api.github.com/users/greenfox-academy/following{/other_user}","gists_url":"https://api.github.com/users/greenfox-academy/gists{/gist_id}","starred_url":"https://api.github.com/users/greenfox-academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenfox-academy/subscriptions","organizations_url":"https://api.github.com/users/greenfox-academy/orgs","repos_url":"https://api.github.com/users/greenfox-academy/repos","events_url":"https://api.github.com/users/greenfox-academy/events{/privacy}","received_events_url":"https://api.github.com/users/greenfox-academy/received_events","type":"Organization","site_admin":false},"repo":{"id":104832497,"name":"epam-jsa-opal","full_name":"greenfox-academy/epam-jsa-opal","owner":{"login":"greenfox-academy","id":14247612,"avatar_url":"https://avatars2.githubusercontent.com/u/14247612?v=4","gravatar_id":"","url":"https://api.github.com/users/greenfox-academy","html_url":"https://github.com/greenfox-academy","followers_url":"https://api.github.com/users/greenfox-academy/followers","following_url":"https://api.github.com/users/greenfox-academy/following{/other_user}","gists_url":"https://api.github.com/users/greenfox-academy/gists{/gist_id}","starred_url":"https://api.github.com/users/greenfox-academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenfox-academy/subscriptions","organizations_url":"https://api.github.com/users/greenfox-academy/orgs","repos_url":"https://api.github.com/users/greenfox-academy/repos","events_url":"https://api.github.com/users/greenfox-academy/events{/privacy}","received_events_url":"https://api.github.com/users/greenfox-academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/greenfox-academy/epam-jsa-opal","description":"work by HAOCHEN ZOE ZHENGNAN","fork":false,"url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal","forks_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/forks","keys_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/teams","hooks_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/hooks","issue_events_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/issues/events{/number}","events_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/events","assignees_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/assignees{/user}","branches_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/branches{/branch}","tags_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/tags","blobs_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/git/refs{/sha}","trees_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/statuses/{sha}","languages_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/languages","stargazers_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/stargazers","contributors_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/contributors","subscribers_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/subscribers","subscription_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/subscription","commits_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/commits{/sha}","git_commits_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/git/commits{/sha}","comments_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/comments{/number}","issue_comment_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/issues/comments{/number}","contents_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/contents/{+path}","compare_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/merges","archive_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/downloads","issues_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/issues{/number}","pulls_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls{/number}","milestones_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/milestones{/number}","notifications_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/labels{/name}","releases_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/releases{/id}","deployments_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/deployments","created_at":"2017-09-26T03:39:56Z","updated_at":"2017-09-26T06:56:32Z","pushed_at":"2017-10-11T02:13:01Z","git_url":"git://github.com/greenfox-academy/epam-jsa-opal.git","ssh_url":"git@github.com:greenfox-academy/epam-jsa-opal.git","clone_url":"https://github.com/greenfox-academy/epam-jsa-opal.git","svn_url":"https://github.com/greenfox-academy/epam-jsa-opal","homepage":null,"size":252,"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":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"greenfox-academy:develop","ref":"develop","sha":"40f2635c597ba06ad1ae5fdb36a2754345f16551","user":{"login":"greenfox-academy","id":14247612,"avatar_url":"https://avatars2.githubusercontent.com/u/14247612?v=4","gravatar_id":"","url":"https://api.github.com/users/greenfox-academy","html_url":"https://github.com/greenfox-academy","followers_url":"https://api.github.com/users/greenfox-academy/followers","following_url":"https://api.github.com/users/greenfox-academy/following{/other_user}","gists_url":"https://api.github.com/users/greenfox-academy/gists{/gist_id}","starred_url":"https://api.github.com/users/greenfox-academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenfox-academy/subscriptions","organizations_url":"https://api.github.com/users/greenfox-academy/orgs","repos_url":"https://api.github.com/users/greenfox-academy/repos","events_url":"https://api.github.com/users/greenfox-academy/events{/privacy}","received_events_url":"https://api.github.com/users/greenfox-academy/received_events","type":"Organization","site_admin":false},"repo":{"id":104832497,"name":"epam-jsa-opal","full_name":"greenfox-academy/epam-jsa-opal","owner":{"login":"greenfox-academy","id":14247612,"avatar_url":"https://avatars2.githubusercontent.com/u/14247612?v=4","gravatar_id":"","url":"https://api.github.com/users/greenfox-academy","html_url":"https://github.com/greenfox-academy","followers_url":"https://api.github.com/users/greenfox-academy/followers","following_url":"https://api.github.com/users/greenfox-academy/following{/other_user}","gists_url":"https://api.github.com/users/greenfox-academy/gists{/gist_id}","starred_url":"https://api.github.com/users/greenfox-academy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/greenfox-academy/subscriptions","organizations_url":"https://api.github.com/users/greenfox-academy/orgs","repos_url":"https://api.github.com/users/greenfox-academy/repos","events_url":"https://api.github.com/users/greenfox-academy/events{/privacy}","received_events_url":"https://api.github.com/users/greenfox-academy/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/greenfox-academy/epam-jsa-opal","description":"work by HAOCHEN ZOE ZHENGNAN","fork":false,"url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal","forks_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/forks","keys_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/teams","hooks_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/hooks","issue_events_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/issues/events{/number}","events_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/events","assignees_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/assignees{/user}","branches_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/branches{/branch}","tags_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/tags","blobs_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/git/refs{/sha}","trees_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/statuses/{sha}","languages_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/languages","stargazers_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/stargazers","contributors_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/contributors","subscribers_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/subscribers","subscription_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/subscription","commits_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/commits{/sha}","git_commits_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/git/commits{/sha}","comments_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/comments{/number}","issue_comment_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/issues/comments{/number}","contents_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/contents/{+path}","compare_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/merges","archive_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/downloads","issues_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/issues{/number}","pulls_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls{/number}","milestones_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/milestones{/number}","notifications_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/labels{/name}","releases_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/releases{/id}","deployments_url":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/deployments","created_at":"2017-09-26T03:39:56Z","updated_at":"2017-09-26T06:56:32Z","pushed_at":"2017-10-11T02:13:01Z","git_url":"git://github.com/greenfox-academy/epam-jsa-opal.git","ssh_url":"git@github.com:greenfox-academy/epam-jsa-opal.git","clone_url":"https://github.com/greenfox-academy/epam-jsa-opal.git","svn_url":"https://github.com/greenfox-academy/epam-jsa-opal","homepage":null,"size":252,"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":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/21"},"html":{"href":"https://github.com/greenfox-academy/epam-jsa-opal/pull/21"},"issue":{"href":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/issues/21"},"comments":{"href":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/greenfox-academy/epam-jsa-opal/statuses/32d0fdb5422d02666deb3b1b375b959c28d5587b"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"ikarasz"}}