{"action":"created","comment":{"url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/comments/207728029","pull_request_review_id":143400921,"id":207728029,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzcyODAyOQ==","diff_hunk":"@@ -0,0 +1,115 @@\n+<?php\n+\n+namespace App\\Http\\Controllers;\n+\n+use App\\TeamMember;\n+use Illuminate\\Http\\Request;\n+use App\\AppUser;\n+use App\\Team;\n+\n+\n+class TeamController extends Controller\n+{\n+    public function create_team(Request $request){\n+        $error_response['status_code'] = '0';\n+        $success_response['status_code'] = '1';\n+\n+        if(!$request->has('rollNo')){\n+            $error_response['status']='Error : rollNo not received.';\n+            return response($error_response);\n+        }\n+\n+        if(!$request->has('team_name')){\n+            $error_response['status']='Error : team_name not received.';\n+            return response($error_response);\n+        }\n+\n+        if(!$request->has('event_id')){\n+            $error_response['status']='Error : event id not received.';\n+            return response($error_response);\n+        }\n+\n+        $id = AppUser::where('rollNo','=',$request->rollNo)->value('id');\n+        $app_user = AppUser::find($id);\n+        if($app_user==null){\n+            $error_response['status']='Error : User not found.';\n+            return response($error_response);\n+        }\n+\n+        $team = new Team();\n+        $team->event_id = $request->event_id;\n+        $team->name = $request->team_name;\n+\n+        $team_member = new TeamMember();\n+        $team_member->rollNo = $request->rollNo;\n+        $team_member->team_id = $team->id;\n+        $team_member->is_creator = true;\n+\n+        return response()->json([\n+            \"status\" => \"OK\",\n+            \"team_id\" => $team->id\n+        ]);\n+    }\n+\n+    public function add_members(Request $request){\n+        $error_response['status_code'] = '0';\n+        $success_response['status_code'] = '1';\n+\n+        if(!$request->has('rollNo')){\n+            $error_response['status']='Error : rollNo not received.';\n+            return response($error_response);\n+        }\n+\n+        if(!$request->has('team_id')){\n+            $error_response['status']='Error : team_id not received.';\n+            return response($error_response);\n+        }\n+\n+        $id = AppUser::where('rollNo','=',$request->rollNo)->value('id');\n+        $app_user = AppUser::find($id);\n+        if($app_user==null){\n+            $error_response['status']='Error : User not found.';\n+            return response($error_response);\n+        }\n+\n+        $team = Team::find($request->team_id);\n+        if($team==null){\n+            $error_response['status']='Error : Team with given ID not found.';\n+            return response($error_response);\n+        }\n+\n+        $team_member = new TeamMember();\n+        $team_member->rollNo = $request->rollNo;\n+        $team_member->team_id = $team->id;\n+        $team_member->is_creator = false;\n+\n+        return response()->json([\n+            \"status\" => \"OK\"\n+        ]);\n+    }\n+\n+    public function get_my_teams(Request $request){\n+        $error_response['status_code'] = '0';\n+        $success_response['status_code'] = '1';\n+\n+        if(!$request->has('rollNo')){\n+            $error_response['status']='Error : rollNo not received.';\n+            return response($error_response);\n+        }\n+\n+        $id = AppUser::where('rollNo','=',$request->rollNo)->value('id');\n+        $app_user = AppUser::find($id);","path":"app/Http/Controllers/TeamController.php","position":33,"original_position":101,"commit_id":"6855def8354ef29888843d1b4b15f93e2f03e683","original_commit_id":"6855def8354ef29888843d1b4b15f93e2f03e683","user":{"login":"AKS1996","id":20796893,"node_id":"MDQ6VXNlcjIwNzk2ODkz","avatar_url":"https://avatars1.githubusercontent.com/u/20796893?v=4","gravatar_id":"","url":"https://api.github.com/users/AKS1996","html_url":"https://github.com/AKS1996","followers_url":"https://api.github.com/users/AKS1996/followers","following_url":"https://api.github.com/users/AKS1996/following{/other_user}","gists_url":"https://api.github.com/users/AKS1996/gists{/gist_id}","starred_url":"https://api.github.com/users/AKS1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AKS1996/subscriptions","organizations_url":"https://api.github.com/users/AKS1996/orgs","repos_url":"https://api.github.com/users/AKS1996/repos","events_url":"https://api.github.com/users/AKS1996/events{/privacy}","received_events_url":"https://api.github.com/users/AKS1996/received_events","type":"User","site_admin":false},"body":"Done","created_at":"2018-08-05T07:32:34Z","updated_at":"2018-08-05T07:36:59Z","html_url":"https://github.com/shriyanshgautam/SnTC-Streamify/pull/3#discussion_r207728029","pull_request_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/3","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/comments/207728029"},"html":{"href":"https://github.com/shriyanshgautam/SnTC-Streamify/pull/3#discussion_r207728029"},"pull_request":{"href":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/3"}},"in_reply_to_id":207300529},"pull_request":{"url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/3","id":201717309,"node_id":"MDExOlB1bGxSZXF1ZXN0MjAxNzE3MzA5","html_url":"https://github.com/shriyanshgautam/SnTC-Streamify/pull/3","diff_url":"https://github.com/shriyanshgautam/SnTC-Streamify/pull/3.diff","patch_url":"https://github.com/shriyanshgautam/SnTC-Streamify/pull/3.patch","issue_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/issues/3","number":3,"state":"closed","locked":false,"title":"Team registration","user":{"login":"AKS1996","id":20796893,"node_id":"MDQ6VXNlcjIwNzk2ODkz","avatar_url":"https://avatars1.githubusercontent.com/u/20796893?v=4","gravatar_id":"","url":"https://api.github.com/users/AKS1996","html_url":"https://github.com/AKS1996","followers_url":"https://api.github.com/users/AKS1996/followers","following_url":"https://api.github.com/users/AKS1996/following{/other_user}","gists_url":"https://api.github.com/users/AKS1996/gists{/gist_id}","starred_url":"https://api.github.com/users/AKS1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AKS1996/subscriptions","organizations_url":"https://api.github.com/users/AKS1996/orgs","repos_url":"https://api.github.com/users/AKS1996/repos","events_url":"https://api.github.com/users/AKS1996/events{/privacy}","received_events_url":"https://api.github.com/users/AKS1996/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-07-16T18:17:17Z","updated_at":"2018-08-05T07:36:59Z","closed_at":"2018-08-02T17:40:19Z","merged_at":"2018-08-02T17:40:19Z","merge_commit_sha":"8e36151bc50cab9f1b671172d62a999c4e418977","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/3/commits","review_comments_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/3/comments","review_comment_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/issues/3/comments","statuses_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/statuses/6855def8354ef29888843d1b4b15f93e2f03e683","head":{"label":"AKS1996:team_registration","ref":"team_registration","sha":"6855def8354ef29888843d1b4b15f93e2f03e683","user":{"login":"AKS1996","id":20796893,"node_id":"MDQ6VXNlcjIwNzk2ODkz","avatar_url":"https://avatars1.githubusercontent.com/u/20796893?v=4","gravatar_id":"","url":"https://api.github.com/users/AKS1996","html_url":"https://github.com/AKS1996","followers_url":"https://api.github.com/users/AKS1996/followers","following_url":"https://api.github.com/users/AKS1996/following{/other_user}","gists_url":"https://api.github.com/users/AKS1996/gists{/gist_id}","starred_url":"https://api.github.com/users/AKS1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AKS1996/subscriptions","organizations_url":"https://api.github.com/users/AKS1996/orgs","repos_url":"https://api.github.com/users/AKS1996/repos","events_url":"https://api.github.com/users/AKS1996/events{/privacy}","received_events_url":"https://api.github.com/users/AKS1996/received_events","type":"User","site_admin":false},"repo":{"id":137879705,"node_id":"MDEwOlJlcG9zaXRvcnkxMzc4Nzk3MDU=","name":"SnTC-Streamify","full_name":"AKS1996/SnTC-Streamify","owner":{"login":"AKS1996","id":20796893,"node_id":"MDQ6VXNlcjIwNzk2ODkz","avatar_url":"https://avatars1.githubusercontent.com/u/20796893?v=4","gravatar_id":"","url":"https://api.github.com/users/AKS1996","html_url":"https://github.com/AKS1996","followers_url":"https://api.github.com/users/AKS1996/followers","following_url":"https://api.github.com/users/AKS1996/following{/other_user}","gists_url":"https://api.github.com/users/AKS1996/gists{/gist_id}","starred_url":"https://api.github.com/users/AKS1996/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AKS1996/subscriptions","organizations_url":"https://api.github.com/users/AKS1996/orgs","repos_url":"https://api.github.com/users/AKS1996/repos","events_url":"https://api.github.com/users/AKS1996/events{/privacy}","received_events_url":"https://api.github.com/users/AKS1996/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AKS1996/SnTC-Streamify","description":null,"fork":true,"url":"https://api.github.com/repos/AKS1996/SnTC-Streamify","forks_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/forks","keys_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/teams","hooks_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/hooks","issue_events_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/issues/events{/number}","events_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/events","assignees_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/assignees{/user}","branches_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/branches{/branch}","tags_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/tags","blobs_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/git/refs{/sha}","trees_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/statuses/{sha}","languages_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/languages","stargazers_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/stargazers","contributors_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/contributors","subscribers_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/subscribers","subscription_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/subscription","commits_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/commits{/sha}","git_commits_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/git/commits{/sha}","comments_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/comments{/number}","issue_comment_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/issues/comments{/number}","contents_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/contents/{+path}","compare_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/merges","archive_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/downloads","issues_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/issues{/number}","pulls_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/pulls{/number}","milestones_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/milestones{/number}","notifications_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/labels{/name}","releases_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/releases{/id}","deployments_url":"https://api.github.com/repos/AKS1996/SnTC-Streamify/deployments","created_at":"2018-06-19T11:02:00Z","updated_at":"2018-07-22T08:33:15Z","pushed_at":"2018-07-22T08:33:13Z","git_url":"git://github.com/AKS1996/SnTC-Streamify.git","ssh_url":"git@github.com:AKS1996/SnTC-Streamify.git","clone_url":"https://github.com/AKS1996/SnTC-Streamify.git","svn_url":"https://github.com/AKS1996/SnTC-Streamify","homepage":null,"size":12086,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"shriyanshgautam:master","ref":"master","sha":"f9ee1b959ae35e17b61027d740a43e36081b40a8","user":{"login":"shriyanshgautam","id":10557788,"node_id":"MDQ6VXNlcjEwNTU3Nzg4","avatar_url":"https://avatars3.githubusercontent.com/u/10557788?v=4","gravatar_id":"","url":"https://api.github.com/users/shriyanshgautam","html_url":"https://github.com/shriyanshgautam","followers_url":"https://api.github.com/users/shriyanshgautam/followers","following_url":"https://api.github.com/users/shriyanshgautam/following{/other_user}","gists_url":"https://api.github.com/users/shriyanshgautam/gists{/gist_id}","starred_url":"https://api.github.com/users/shriyanshgautam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shriyanshgautam/subscriptions","organizations_url":"https://api.github.com/users/shriyanshgautam/orgs","repos_url":"https://api.github.com/users/shriyanshgautam/repos","events_url":"https://api.github.com/users/shriyanshgautam/events{/privacy}","received_events_url":"https://api.github.com/users/shriyanshgautam/received_events","type":"User","site_admin":false},"repo":{"id":100986788,"node_id":"MDEwOlJlcG9zaXRvcnkxMDA5ODY3ODg=","name":"SnTC-Streamify","full_name":"shriyanshgautam/SnTC-Streamify","owner":{"login":"shriyanshgautam","id":10557788,"node_id":"MDQ6VXNlcjEwNTU3Nzg4","avatar_url":"https://avatars3.githubusercontent.com/u/10557788?v=4","gravatar_id":"","url":"https://api.github.com/users/shriyanshgautam","html_url":"https://github.com/shriyanshgautam","followers_url":"https://api.github.com/users/shriyanshgautam/followers","following_url":"https://api.github.com/users/shriyanshgautam/following{/other_user}","gists_url":"https://api.github.com/users/shriyanshgautam/gists{/gist_id}","starred_url":"https://api.github.com/users/shriyanshgautam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shriyanshgautam/subscriptions","organizations_url":"https://api.github.com/users/shriyanshgautam/orgs","repos_url":"https://api.github.com/users/shriyanshgautam/repos","events_url":"https://api.github.com/users/shriyanshgautam/events{/privacy}","received_events_url":"https://api.github.com/users/shriyanshgautam/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shriyanshgautam/SnTC-Streamify","description":null,"fork":false,"url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify","forks_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/forks","keys_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/teams","hooks_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/hooks","issue_events_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/issues/events{/number}","events_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/events","assignees_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/assignees{/user}","branches_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/branches{/branch}","tags_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/tags","blobs_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/git/refs{/sha}","trees_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/statuses/{sha}","languages_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/languages","stargazers_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/stargazers","contributors_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/contributors","subscribers_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/subscribers","subscription_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/subscription","commits_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/commits{/sha}","git_commits_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/git/commits{/sha}","comments_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/comments{/number}","issue_comment_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/issues/comments{/number}","contents_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/contents/{+path}","compare_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/merges","archive_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/downloads","issues_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/issues{/number}","pulls_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls{/number}","milestones_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/milestones{/number}","notifications_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/labels{/name}","releases_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/releases{/id}","deployments_url":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/deployments","created_at":"2017-08-21T19:46:36Z","updated_at":"2018-08-04T07:38:13Z","pushed_at":"2018-08-04T07:38:11Z","git_url":"git://github.com/shriyanshgautam/SnTC-Streamify.git","ssh_url":"git@github.com:shriyanshgautam/SnTC-Streamify.git","clone_url":"https://github.com/shriyanshgautam/SnTC-Streamify.git","svn_url":"https://github.com/shriyanshgautam/SnTC-Streamify","homepage":null,"size":12092,"stargazers_count":1,"watchers_count":1,"language":"PHP","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":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1,"open_issues":0,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/3"},"html":{"href":"https://github.com/shriyanshgautam/SnTC-Streamify/pull/3"},"issue":{"href":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/issues/3"},"comments":{"href":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/shriyanshgautam/SnTC-Streamify/statuses/6855def8354ef29888843d1b4b15f93e2f03e683"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"AKS1996"}}