{"action":"created","comment":{"url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/comments/110487183","pull_request_review_id":31669218,"id":110487183,"diff_hunk":"@@ -0,0 +1,81 @@\n+/*jslint node: true */\n+'use strict';\n+\n+const Promise = require('bluebird');\n+const Pool = require('pg-pool');\n+const Sugar = require('sugar'); // library to extend native JS Objects\n+const SQL = require('sql-template-strings')\n+\n+const env = (process.env.env_stage === 'undefined') ?\n+    \"local\" : process.env.env_stage;\n+\n+const basePath = (env === \"local\") ? \"../../../../../../\" : \"../../../../../\";\n+const config = require(basePath + 'config.js');\n+const pool = new Pool(config[env].database);\n+\n+const Error = require(basePath + 'interfaces/Error.js');\n+const Finance_History = require(basePath + 'interfaces/user/finance_history.js');\n+\n+module.exports.handler = (event, context, callback) => {\n+    console.log(event);\n+    console.log(context);\n+\n+    context.callbackWaitsForEmptyEventLoop = false;\n+\n+    let body = event.body;\n+    try {\n+        body = JSON.parse(event.body);\n+    } catch (err) {}\n+\n+    Promise.coroutine(function* () {\n+\n+        const team_id = event.pathParameters.team_id;\n+        const user_id = event.pathParameters.user_id;\n+\n+        let client = yield pool.connect();\n+        try {\n+\n+            const query = SQL `\n+                    SELECT          (tf.amount) as amount, tf.transaction_date\n+                    FROM            team_financials tf\n+                    LEFT JOIN       team_category tc ON tc.code_category_id = tf.team_category_id\n+                    INNER JOIN      user_team ut ON ut.id = tf.user_team_id\n+                    WHERE           ut.user_id = ${user_id} AND\n+                                    ut.team_id = ${team_id} AND\n+                                    tf.team_category_id IS NULL","path":"api-team/functions/user/finance/deposit/get/index.js","position":45,"original_position":45,"commit_id":"e61ef78d64854ef88c1368a6fa03a1e393b8e780","original_commit_id":"e61ef78d64854ef88c1368a6fa03a1e393b8e780","user":{"login":"shreyansjain","id":2359895,"avatar_url":"https://avatars1.githubusercontent.com/u/2359895?v=3","gravatar_id":"","url":"https://api.github.com/users/shreyansjain","html_url":"https://github.com/shreyansjain","followers_url":"https://api.github.com/users/shreyansjain/followers","following_url":"https://api.github.com/users/shreyansjain/following{/other_user}","gists_url":"https://api.github.com/users/shreyansjain/gists{/gist_id}","starred_url":"https://api.github.com/users/shreyansjain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreyansjain/subscriptions","organizations_url":"https://api.github.com/users/shreyansjain/orgs","repos_url":"https://api.github.com/users/shreyansjain/repos","events_url":"https://api.github.com/users/shreyansjain/events{/privacy}","received_events_url":"https://api.github.com/users/shreyansjain/received_events","type":"User","site_admin":false},"body":"how?","created_at":"2017-04-07T21:32:19Z","updated_at":"2017-04-07T21:32:19Z","html_url":"https://github.com/PayUppApp/PayUpp-AWS/pull/109#discussion_r110487183","pull_request_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/109","_links":{"self":{"href":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/comments/110487183"},"html":{"href":"https://github.com/PayUppApp/PayUpp-AWS/pull/109#discussion_r110487183"},"pull_request":{"href":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/109"}}},"pull_request":{"url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/109","id":114898517,"html_url":"https://github.com/PayUppApp/PayUpp-AWS/pull/109","diff_url":"https://github.com/PayUppApp/PayUpp-AWS/pull/109.diff","patch_url":"https://github.com/PayUppApp/PayUpp-AWS/pull/109.patch","issue_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/issues/109","number":109,"state":"open","locked":false,"title":"I#106: API for get deposit list for team-user","user":{"login":"shreyansjain","id":2359895,"avatar_url":"https://avatars1.githubusercontent.com/u/2359895?v=3","gravatar_id":"","url":"https://api.github.com/users/shreyansjain","html_url":"https://github.com/shreyansjain","followers_url":"https://api.github.com/users/shreyansjain/followers","following_url":"https://api.github.com/users/shreyansjain/following{/other_user}","gists_url":"https://api.github.com/users/shreyansjain/gists{/gist_id}","starred_url":"https://api.github.com/users/shreyansjain/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shreyansjain/subscriptions","organizations_url":"https://api.github.com/users/shreyansjain/orgs","repos_url":"https://api.github.com/users/shreyansjain/repos","events_url":"https://api.github.com/users/shreyansjain/events{/privacy}","received_events_url":"https://api.github.com/users/shreyansjain/received_events","type":"User","site_admin":false},"body":"#106 ","created_at":"2017-04-07T20:53:33Z","updated_at":"2017-04-07T21:32:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8362f3a7f9d4387a67f2ef5ebecdfce30c61e089","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/109/commits","review_comments_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/109/comments","review_comment_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/comments{/number}","comments_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/issues/109/comments","statuses_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/statuses/e61ef78d64854ef88c1368a6fa03a1e393b8e780","head":{"label":"PayUppApp:I#106","ref":"I#106","sha":"e61ef78d64854ef88c1368a6fa03a1e393b8e780","user":{"login":"PayUppApp","id":25312779,"avatar_url":"https://avatars0.githubusercontent.com/u/25312779?v=3","gravatar_id":"","url":"https://api.github.com/users/PayUppApp","html_url":"https://github.com/PayUppApp","followers_url":"https://api.github.com/users/PayUppApp/followers","following_url":"https://api.github.com/users/PayUppApp/following{/other_user}","gists_url":"https://api.github.com/users/PayUppApp/gists{/gist_id}","starred_url":"https://api.github.com/users/PayUppApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PayUppApp/subscriptions","organizations_url":"https://api.github.com/users/PayUppApp/orgs","repos_url":"https://api.github.com/users/PayUppApp/repos","events_url":"https://api.github.com/users/PayUppApp/events{/privacy}","received_events_url":"https://api.github.com/users/PayUppApp/received_events","type":"Organization","site_admin":false},"repo":{"id":81541099,"name":"PayUpp-AWS","full_name":"PayUppApp/PayUpp-AWS","owner":{"login":"PayUppApp","id":25312779,"avatar_url":"https://avatars0.githubusercontent.com/u/25312779?v=3","gravatar_id":"","url":"https://api.github.com/users/PayUppApp","html_url":"https://github.com/PayUppApp","followers_url":"https://api.github.com/users/PayUppApp/followers","following_url":"https://api.github.com/users/PayUppApp/following{/other_user}","gists_url":"https://api.github.com/users/PayUppApp/gists{/gist_id}","starred_url":"https://api.github.com/users/PayUppApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PayUppApp/subscriptions","organizations_url":"https://api.github.com/users/PayUppApp/orgs","repos_url":"https://api.github.com/users/PayUppApp/repos","events_url":"https://api.github.com/users/PayUppApp/events{/privacy}","received_events_url":"https://api.github.com/users/PayUppApp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PayUppApp/PayUpp-AWS","description":null,"fork":false,"url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS","forks_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/forks","keys_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/teams","hooks_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/hooks","issue_events_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/issues/events{/number}","events_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/events","assignees_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/assignees{/user}","branches_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/branches{/branch}","tags_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/tags","blobs_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/git/refs{/sha}","trees_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/statuses/{sha}","languages_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/languages","stargazers_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/stargazers","contributors_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/contributors","subscribers_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/subscribers","subscription_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/subscription","commits_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/commits{/sha}","git_commits_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/git/commits{/sha}","comments_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/comments{/number}","issue_comment_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/issues/comments{/number}","contents_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/contents/{+path}","compare_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/merges","archive_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/downloads","issues_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/issues{/number}","pulls_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls{/number}","milestones_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/milestones{/number}","notifications_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/labels{/name}","releases_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/releases{/id}","deployments_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/deployments","created_at":"2017-02-10T07:52:18Z","updated_at":"2017-02-23T18:04:42Z","pushed_at":"2017-04-07T21:27:38Z","git_url":"git://github.com/PayUppApp/PayUpp-AWS.git","ssh_url":"git@github.com:PayUppApp/PayUpp-AWS.git","clone_url":"https://github.com/PayUppApp/PayUpp-AWS.git","svn_url":"https://github.com/PayUppApp/PayUpp-AWS","homepage":null,"size":132,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":30,"forks":0,"open_issues":30,"watchers":0,"default_branch":"master"}},"base":{"label":"PayUppApp:master","ref":"master","sha":"f41f6193cdb7c16895f7eeb9c7d5f67405ad85b8","user":{"login":"PayUppApp","id":25312779,"avatar_url":"https://avatars0.githubusercontent.com/u/25312779?v=3","gravatar_id":"","url":"https://api.github.com/users/PayUppApp","html_url":"https://github.com/PayUppApp","followers_url":"https://api.github.com/users/PayUppApp/followers","following_url":"https://api.github.com/users/PayUppApp/following{/other_user}","gists_url":"https://api.github.com/users/PayUppApp/gists{/gist_id}","starred_url":"https://api.github.com/users/PayUppApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PayUppApp/subscriptions","organizations_url":"https://api.github.com/users/PayUppApp/orgs","repos_url":"https://api.github.com/users/PayUppApp/repos","events_url":"https://api.github.com/users/PayUppApp/events{/privacy}","received_events_url":"https://api.github.com/users/PayUppApp/received_events","type":"Organization","site_admin":false},"repo":{"id":81541099,"name":"PayUpp-AWS","full_name":"PayUppApp/PayUpp-AWS","owner":{"login":"PayUppApp","id":25312779,"avatar_url":"https://avatars0.githubusercontent.com/u/25312779?v=3","gravatar_id":"","url":"https://api.github.com/users/PayUppApp","html_url":"https://github.com/PayUppApp","followers_url":"https://api.github.com/users/PayUppApp/followers","following_url":"https://api.github.com/users/PayUppApp/following{/other_user}","gists_url":"https://api.github.com/users/PayUppApp/gists{/gist_id}","starred_url":"https://api.github.com/users/PayUppApp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PayUppApp/subscriptions","organizations_url":"https://api.github.com/users/PayUppApp/orgs","repos_url":"https://api.github.com/users/PayUppApp/repos","events_url":"https://api.github.com/users/PayUppApp/events{/privacy}","received_events_url":"https://api.github.com/users/PayUppApp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/PayUppApp/PayUpp-AWS","description":null,"fork":false,"url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS","forks_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/forks","keys_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/teams","hooks_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/hooks","issue_events_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/issues/events{/number}","events_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/events","assignees_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/assignees{/user}","branches_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/branches{/branch}","tags_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/tags","blobs_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/git/refs{/sha}","trees_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/statuses/{sha}","languages_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/languages","stargazers_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/stargazers","contributors_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/contributors","subscribers_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/subscribers","subscription_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/subscription","commits_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/commits{/sha}","git_commits_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/git/commits{/sha}","comments_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/comments{/number}","issue_comment_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/issues/comments{/number}","contents_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/contents/{+path}","compare_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/merges","archive_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/downloads","issues_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/issues{/number}","pulls_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls{/number}","milestones_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/milestones{/number}","notifications_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/labels{/name}","releases_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/releases{/id}","deployments_url":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/deployments","created_at":"2017-02-10T07:52:18Z","updated_at":"2017-02-23T18:04:42Z","pushed_at":"2017-04-07T21:27:38Z","git_url":"git://github.com/PayUppApp/PayUpp-AWS.git","ssh_url":"git@github.com:PayUppApp/PayUpp-AWS.git","clone_url":"https://github.com/PayUppApp/PayUpp-AWS.git","svn_url":"https://github.com/PayUppApp/PayUpp-AWS","homepage":null,"size":132,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":30,"forks":0,"open_issues":30,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/109"},"html":{"href":"https://github.com/PayUppApp/PayUpp-AWS/pull/109"},"issue":{"href":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/issues/109"},"comments":{"href":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/issues/109/comments"},"review_comments":{"href":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/109/comments"},"review_comment":{"href":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/pulls/109/commits"},"statuses":{"href":"https://api.github.com/repos/PayUppApp/PayUpp-AWS/statuses/e61ef78d64854ef88c1368a6fa03a1e393b8e780"}}}}
{"actor":{"display_login":"shreyansjain"}}