{"action":"created","comment":{"url":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/comments/77443991","id":77443991,"diff_hunk":"@@ -0,0 +1,67 @@\n+/**\n+ * Created by shujaatali on 04/05/16.\n+ */\n+var config = require('../nodejs_config/config.js');\n+var jwt = require('jsonwebtoken');\n+var mailgun = require('mailgun-js')({apiKey: config.App.mailGunApiKey, domain: config.App.mailGunDomain});\n+var db = require('nano-blue')(config.App.CouchServerIp+'/members');\n+exports.checkUserName = function(req,res){\n+\n+\n+        db.view('cbs', 'getMemberByUsername', {key: req.body.username, include_docs: true}, function(err, respBody) {\n+        if (err) {\n+        return err;\n+             } else {\n+            if (respBody.rows.length === 0) { // a doc with this 'username' does not exist in db\n+            return 0;","path":"services/forgetPasswordService.js","position":16,"original_position":16,"commit_id":"78d3018b18388ae8742de2e3505bcff14d3dadab","original_commit_id":"78d3018b18388ae8742de2e3505bcff14d3dadab","user":{"login":"omeryousaf","id":6904200,"avatar_url":"https://avatars.githubusercontent.com/u/6904200?v=3","gravatar_id":"","url":"https://api.github.com/users/omeryousaf","html_url":"https://github.com/omeryousaf","followers_url":"https://api.github.com/users/omeryousaf/followers","following_url":"https://api.github.com/users/omeryousaf/following{/other_user}","gists_url":"https://api.github.com/users/omeryousaf/gists{/gist_id}","starred_url":"https://api.github.com/users/omeryousaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omeryousaf/subscriptions","organizations_url":"https://api.github.com/users/omeryousaf/orgs","repos_url":"https://api.github.com/users/omeryousaf/repos","events_url":"https://api.github.com/users/omeryousaf/events{/privacy}","received_events_url":"https://api.github.com/users/omeryousaf/received_events","type":"User","site_admin":false},"body":"koi message ya error code bhi set karlo so that you can give user a helpful message like \"the username you tried does not exist\" etc.","created_at":"2016-09-03T22:31:17Z","updated_at":"2016-09-03T22:31:17Z","html_url":"https://github.com/omeryousaf/cbs_community/pull/15#discussion_r77443991","pull_request_url":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/15","_links":{"self":{"href":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/comments/77443991"},"html":{"href":"https://github.com/omeryousaf/cbs_community/pull/15#discussion_r77443991"},"pull_request":{"href":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/15"}}},"pull_request":{"url":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/15","id":81594410,"html_url":"https://github.com/omeryousaf/cbs_community/pull/15","diff_url":"https://github.com/omeryousaf/cbs_community/pull/15.diff","patch_url":"https://github.com/omeryousaf/cbs_community/pull/15.patch","issue_url":"https://api.github.com/repos/omeryousaf/cbs_community/issues/15","number":15,"state":"open","locked":false,"title":"Forgot password feature","user":{"login":"Shujaat89","id":5362457,"avatar_url":"https://avatars.githubusercontent.com/u/5362457?v=3","gravatar_id":"","url":"https://api.github.com/users/Shujaat89","html_url":"https://github.com/Shujaat89","followers_url":"https://api.github.com/users/Shujaat89/followers","following_url":"https://api.github.com/users/Shujaat89/following{/other_user}","gists_url":"https://api.github.com/users/Shujaat89/gists{/gist_id}","starred_url":"https://api.github.com/users/Shujaat89/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Shujaat89/subscriptions","organizations_url":"https://api.github.com/users/Shujaat89/orgs","repos_url":"https://api.github.com/users/Shujaat89/repos","events_url":"https://api.github.com/users/Shujaat89/events{/privacy}","received_events_url":"https://api.github.com/users/Shujaat89/received_events","type":"User","site_admin":false},"body":"p.s. its not the last comment, this feature still needs a lots of\ndesign changes plus i have hard coded my email id in there because we\nstill haven’t bought the mail gun api @omeryousaf","created_at":"2016-08-17T07:14:27Z","updated_at":"2016-09-03T22:31:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/15/commits","review_comments_url":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/15/comments","review_comment_url":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/comments{/number}","comments_url":"https://api.github.com/repos/omeryousaf/cbs_community/issues/15/comments","statuses_url":"https://api.github.com/repos/omeryousaf/cbs_community/statuses/78d3018b18388ae8742de2e3505bcff14d3dadab","head":{"label":"omeryousaf:forgot_password_feature","ref":"forgot_password_feature","sha":"78d3018b18388ae8742de2e3505bcff14d3dadab","user":{"login":"omeryousaf","id":6904200,"avatar_url":"https://avatars.githubusercontent.com/u/6904200?v=3","gravatar_id":"","url":"https://api.github.com/users/omeryousaf","html_url":"https://github.com/omeryousaf","followers_url":"https://api.github.com/users/omeryousaf/followers","following_url":"https://api.github.com/users/omeryousaf/following{/other_user}","gists_url":"https://api.github.com/users/omeryousaf/gists{/gist_id}","starred_url":"https://api.github.com/users/omeryousaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omeryousaf/subscriptions","organizations_url":"https://api.github.com/users/omeryousaf/orgs","repos_url":"https://api.github.com/users/omeryousaf/repos","events_url":"https://api.github.com/users/omeryousaf/events{/privacy}","received_events_url":"https://api.github.com/users/omeryousaf/received_events","type":"User","site_admin":false},"repo":{"id":32722424,"name":"cbs_community","full_name":"omeryousaf/cbs_community","owner":{"login":"omeryousaf","id":6904200,"avatar_url":"https://avatars.githubusercontent.com/u/6904200?v=3","gravatar_id":"","url":"https://api.github.com/users/omeryousaf","html_url":"https://github.com/omeryousaf","followers_url":"https://api.github.com/users/omeryousaf/followers","following_url":"https://api.github.com/users/omeryousaf/following{/other_user}","gists_url":"https://api.github.com/users/omeryousaf/gists{/gist_id}","starred_url":"https://api.github.com/users/omeryousaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omeryousaf/subscriptions","organizations_url":"https://api.github.com/users/omeryousaf/orgs","repos_url":"https://api.github.com/users/omeryousaf/repos","events_url":"https://api.github.com/users/omeryousaf/events{/privacy}","received_events_url":"https://api.github.com/users/omeryousaf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/omeryousaf/cbs_community","description":"Website for Chand Bagh School community","fork":false,"url":"https://api.github.com/repos/omeryousaf/cbs_community","forks_url":"https://api.github.com/repos/omeryousaf/cbs_community/forks","keys_url":"https://api.github.com/repos/omeryousaf/cbs_community/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omeryousaf/cbs_community/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omeryousaf/cbs_community/teams","hooks_url":"https://api.github.com/repos/omeryousaf/cbs_community/hooks","issue_events_url":"https://api.github.com/repos/omeryousaf/cbs_community/issues/events{/number}","events_url":"https://api.github.com/repos/omeryousaf/cbs_community/events","assignees_url":"https://api.github.com/repos/omeryousaf/cbs_community/assignees{/user}","branches_url":"https://api.github.com/repos/omeryousaf/cbs_community/branches{/branch}","tags_url":"https://api.github.com/repos/omeryousaf/cbs_community/tags","blobs_url":"https://api.github.com/repos/omeryousaf/cbs_community/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omeryousaf/cbs_community/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omeryousaf/cbs_community/git/refs{/sha}","trees_url":"https://api.github.com/repos/omeryousaf/cbs_community/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omeryousaf/cbs_community/statuses/{sha}","languages_url":"https://api.github.com/repos/omeryousaf/cbs_community/languages","stargazers_url":"https://api.github.com/repos/omeryousaf/cbs_community/stargazers","contributors_url":"https://api.github.com/repos/omeryousaf/cbs_community/contributors","subscribers_url":"https://api.github.com/repos/omeryousaf/cbs_community/subscribers","subscription_url":"https://api.github.com/repos/omeryousaf/cbs_community/subscription","commits_url":"https://api.github.com/repos/omeryousaf/cbs_community/commits{/sha}","git_commits_url":"https://api.github.com/repos/omeryousaf/cbs_community/git/commits{/sha}","comments_url":"https://api.github.com/repos/omeryousaf/cbs_community/comments{/number}","issue_comment_url":"https://api.github.com/repos/omeryousaf/cbs_community/issues/comments{/number}","contents_url":"https://api.github.com/repos/omeryousaf/cbs_community/contents/{+path}","compare_url":"https://api.github.com/repos/omeryousaf/cbs_community/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omeryousaf/cbs_community/merges","archive_url":"https://api.github.com/repos/omeryousaf/cbs_community/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omeryousaf/cbs_community/downloads","issues_url":"https://api.github.com/repos/omeryousaf/cbs_community/issues{/number}","pulls_url":"https://api.github.com/repos/omeryousaf/cbs_community/pulls{/number}","milestones_url":"https://api.github.com/repos/omeryousaf/cbs_community/milestones{/number}","notifications_url":"https://api.github.com/repos/omeryousaf/cbs_community/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omeryousaf/cbs_community/labels{/name}","releases_url":"https://api.github.com/repos/omeryousaf/cbs_community/releases{/id}","deployments_url":"https://api.github.com/repos/omeryousaf/cbs_community/deployments","created_at":"2015-03-23T09:28:35Z","updated_at":"2016-03-07T17:14:47Z","pushed_at":"2016-09-03T12:26:48Z","git_url":"git://github.com/omeryousaf/cbs_community.git","ssh_url":"git@github.com:omeryousaf/cbs_community.git","clone_url":"https://github.com/omeryousaf/cbs_community.git","svn_url":"https://github.com/omeryousaf/cbs_community","homepage":null,"size":773,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"base":{"label":"omeryousaf:dev","ref":"dev","sha":"fec93ed8e0720de8a77bb576126889980cd86bb8","user":{"login":"omeryousaf","id":6904200,"avatar_url":"https://avatars.githubusercontent.com/u/6904200?v=3","gravatar_id":"","url":"https://api.github.com/users/omeryousaf","html_url":"https://github.com/omeryousaf","followers_url":"https://api.github.com/users/omeryousaf/followers","following_url":"https://api.github.com/users/omeryousaf/following{/other_user}","gists_url":"https://api.github.com/users/omeryousaf/gists{/gist_id}","starred_url":"https://api.github.com/users/omeryousaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omeryousaf/subscriptions","organizations_url":"https://api.github.com/users/omeryousaf/orgs","repos_url":"https://api.github.com/users/omeryousaf/repos","events_url":"https://api.github.com/users/omeryousaf/events{/privacy}","received_events_url":"https://api.github.com/users/omeryousaf/received_events","type":"User","site_admin":false},"repo":{"id":32722424,"name":"cbs_community","full_name":"omeryousaf/cbs_community","owner":{"login":"omeryousaf","id":6904200,"avatar_url":"https://avatars.githubusercontent.com/u/6904200?v=3","gravatar_id":"","url":"https://api.github.com/users/omeryousaf","html_url":"https://github.com/omeryousaf","followers_url":"https://api.github.com/users/omeryousaf/followers","following_url":"https://api.github.com/users/omeryousaf/following{/other_user}","gists_url":"https://api.github.com/users/omeryousaf/gists{/gist_id}","starred_url":"https://api.github.com/users/omeryousaf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/omeryousaf/subscriptions","organizations_url":"https://api.github.com/users/omeryousaf/orgs","repos_url":"https://api.github.com/users/omeryousaf/repos","events_url":"https://api.github.com/users/omeryousaf/events{/privacy}","received_events_url":"https://api.github.com/users/omeryousaf/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/omeryousaf/cbs_community","description":"Website for Chand Bagh School community","fork":false,"url":"https://api.github.com/repos/omeryousaf/cbs_community","forks_url":"https://api.github.com/repos/omeryousaf/cbs_community/forks","keys_url":"https://api.github.com/repos/omeryousaf/cbs_community/keys{/key_id}","collaborators_url":"https://api.github.com/repos/omeryousaf/cbs_community/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/omeryousaf/cbs_community/teams","hooks_url":"https://api.github.com/repos/omeryousaf/cbs_community/hooks","issue_events_url":"https://api.github.com/repos/omeryousaf/cbs_community/issues/events{/number}","events_url":"https://api.github.com/repos/omeryousaf/cbs_community/events","assignees_url":"https://api.github.com/repos/omeryousaf/cbs_community/assignees{/user}","branches_url":"https://api.github.com/repos/omeryousaf/cbs_community/branches{/branch}","tags_url":"https://api.github.com/repos/omeryousaf/cbs_community/tags","blobs_url":"https://api.github.com/repos/omeryousaf/cbs_community/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/omeryousaf/cbs_community/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/omeryousaf/cbs_community/git/refs{/sha}","trees_url":"https://api.github.com/repos/omeryousaf/cbs_community/git/trees{/sha}","statuses_url":"https://api.github.com/repos/omeryousaf/cbs_community/statuses/{sha}","languages_url":"https://api.github.com/repos/omeryousaf/cbs_community/languages","stargazers_url":"https://api.github.com/repos/omeryousaf/cbs_community/stargazers","contributors_url":"https://api.github.com/repos/omeryousaf/cbs_community/contributors","subscribers_url":"https://api.github.com/repos/omeryousaf/cbs_community/subscribers","subscription_url":"https://api.github.com/repos/omeryousaf/cbs_community/subscription","commits_url":"https://api.github.com/repos/omeryousaf/cbs_community/commits{/sha}","git_commits_url":"https://api.github.com/repos/omeryousaf/cbs_community/git/commits{/sha}","comments_url":"https://api.github.com/repos/omeryousaf/cbs_community/comments{/number}","issue_comment_url":"https://api.github.com/repos/omeryousaf/cbs_community/issues/comments{/number}","contents_url":"https://api.github.com/repos/omeryousaf/cbs_community/contents/{+path}","compare_url":"https://api.github.com/repos/omeryousaf/cbs_community/compare/{base}...{head}","merges_url":"https://api.github.com/repos/omeryousaf/cbs_community/merges","archive_url":"https://api.github.com/repos/omeryousaf/cbs_community/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/omeryousaf/cbs_community/downloads","issues_url":"https://api.github.com/repos/omeryousaf/cbs_community/issues{/number}","pulls_url":"https://api.github.com/repos/omeryousaf/cbs_community/pulls{/number}","milestones_url":"https://api.github.com/repos/omeryousaf/cbs_community/milestones{/number}","notifications_url":"https://api.github.com/repos/omeryousaf/cbs_community/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/omeryousaf/cbs_community/labels{/name}","releases_url":"https://api.github.com/repos/omeryousaf/cbs_community/releases{/id}","deployments_url":"https://api.github.com/repos/omeryousaf/cbs_community/deployments","created_at":"2015-03-23T09:28:35Z","updated_at":"2016-03-07T17:14:47Z","pushed_at":"2016-09-03T12:26:48Z","git_url":"git://github.com/omeryousaf/cbs_community.git","ssh_url":"git@github.com:omeryousaf/cbs_community.git","clone_url":"https://github.com/omeryousaf/cbs_community.git","svn_url":"https://github.com/omeryousaf/cbs_community","homepage":null,"size":773,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":6,"forks":0,"open_issues":6,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/15"},"html":{"href":"https://github.com/omeryousaf/cbs_community/pull/15"},"issue":{"href":"https://api.github.com/repos/omeryousaf/cbs_community/issues/15"},"comments":{"href":"https://api.github.com/repos/omeryousaf/cbs_community/issues/15/comments"},"review_comments":{"href":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/15/comments"},"review_comment":{"href":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/omeryousaf/cbs_community/pulls/15/commits"},"statuses":{"href":"https://api.github.com/repos/omeryousaf/cbs_community/statuses/78d3018b18388ae8742de2e3505bcff14d3dadab"}}}}
{"actor":{"display_login":"omeryousaf"}}