{"action":"created","comment":{"url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/comments/55818187","id":55818187,"diff_hunk":"@@ -0,0 +1,41 @@\n+'use strict';\n+const collectionService = require('../../lib/facade/collection.js');\n+\n+module.exports = {\n+  getCollectionListing,\n+  createCollection,\n+  updateCollection,\n+  deleteCollection\n+};\n+\n+/** Controller to resolve app listing request*/\n+function getCollectionListing(req, res, next) {\n+  collectionService.getCollectionListing(req.body, req.params.appId)\n+    .then(function (response) {\n+      return res.status(200).json({\n+        data: response,\n+        meta: [{length: response.length}]\n+      });\n+    }).catch(next);\n+}\n+\n+function createCollection(req, res, next) {\n+  collectionService.createCollection(req.body, req.params.appId)\n+    .then((response) => {\n+      res.status(201).json(response[0]);","path":"crust/controllers/collection.js","position":25,"original_position":25,"commit_id":"382a9e243b84960de67a6e5682bc25df8a408964","original_commit_id":"382a9e243b84960de67a6e5682bc25df8a408964","user":{"login":"faizulhaque-tp","id":5235651,"avatar_url":"https://avatars.githubusercontent.com/u/5235651?v=3","gravatar_id":"","url":"https://api.github.com/users/faizulhaque-tp","html_url":"https://github.com/faizulhaque-tp","followers_url":"https://api.github.com/users/faizulhaque-tp/followers","following_url":"https://api.github.com/users/faizulhaque-tp/following{/other_user}","gists_url":"https://api.github.com/users/faizulhaque-tp/gists{/gist_id}","starred_url":"https://api.github.com/users/faizulhaque-tp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faizulhaque-tp/subscriptions","organizations_url":"https://api.github.com/users/faizulhaque-tp/orgs","repos_url":"https://api.github.com/users/faizulhaque-tp/repos","events_url":"https://api.github.com/users/faizulhaque-tp/events{/privacy}","received_events_url":"https://api.github.com/users/faizulhaque-tp/received_events","type":"User","site_admin":false},"body":"any reason for response[0] ? should be handle in createCollection","created_at":"2016-03-11T11:17:22Z","updated_at":"2016-03-11T11:17:22Z","html_url":"https://github.com/faizulhaque-tp/dynamic-BE/pull/5#discussion_r55818187","pull_request_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/comments/55818187"},"html":{"href":"https://github.com/faizulhaque-tp/dynamic-BE/pull/5#discussion_r55818187"},"pull_request":{"href":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/5","id":62526805,"html_url":"https://github.com/faizulhaque-tp/dynamic-BE/pull/5","diff_url":"https://github.com/faizulhaque-tp/dynamic-BE/pull/5.diff","patch_url":"https://github.com/faizulhaque-tp/dynamic-BE/pull/5.patch","issue_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/issues/5","number":5,"state":"open","locked":false,"title":"collection list,add,update,delete","user":{"login":"hasanhameed07","id":3350923,"avatar_url":"https://avatars.githubusercontent.com/u/3350923?v=3","gravatar_id":"","url":"https://api.github.com/users/hasanhameed07","html_url":"https://github.com/hasanhameed07","followers_url":"https://api.github.com/users/hasanhameed07/followers","following_url":"https://api.github.com/users/hasanhameed07/following{/other_user}","gists_url":"https://api.github.com/users/hasanhameed07/gists{/gist_id}","starred_url":"https://api.github.com/users/hasanhameed07/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hasanhameed07/subscriptions","organizations_url":"https://api.github.com/users/hasanhameed07/orgs","repos_url":"https://api.github.com/users/hasanhameed07/repos","events_url":"https://api.github.com/users/hasanhameed07/events{/privacy}","received_events_url":"https://api.github.com/users/hasanhameed07/received_events","type":"User","site_admin":false},"body":"collection list,add,update,delete","created_at":"2016-03-11T10:52:48Z","updated_at":"2016-03-11T11:17:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b989c33af07318b62e9e571b1d6e98ec98b3eec5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/5/commits","review_comments_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/5/comments","review_comment_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/comments{/number}","comments_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/issues/5/comments","statuses_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/statuses/382a9e243b84960de67a6e5682bc25df8a408964","head":{"label":"faizulhaque-tp:development_collections","ref":"development_collections","sha":"382a9e243b84960de67a6e5682bc25df8a408964","user":{"login":"faizulhaque-tp","id":5235651,"avatar_url":"https://avatars.githubusercontent.com/u/5235651?v=3","gravatar_id":"","url":"https://api.github.com/users/faizulhaque-tp","html_url":"https://github.com/faizulhaque-tp","followers_url":"https://api.github.com/users/faizulhaque-tp/followers","following_url":"https://api.github.com/users/faizulhaque-tp/following{/other_user}","gists_url":"https://api.github.com/users/faizulhaque-tp/gists{/gist_id}","starred_url":"https://api.github.com/users/faizulhaque-tp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faizulhaque-tp/subscriptions","organizations_url":"https://api.github.com/users/faizulhaque-tp/orgs","repos_url":"https://api.github.com/users/faizulhaque-tp/repos","events_url":"https://api.github.com/users/faizulhaque-tp/events{/privacy}","received_events_url":"https://api.github.com/users/faizulhaque-tp/received_events","type":"User","site_admin":false},"repo":{"id":51735991,"name":"dynamic-BE","full_name":"faizulhaque-tp/dynamic-BE","owner":{"login":"faizulhaque-tp","id":5235651,"avatar_url":"https://avatars.githubusercontent.com/u/5235651?v=3","gravatar_id":"","url":"https://api.github.com/users/faizulhaque-tp","html_url":"https://github.com/faizulhaque-tp","followers_url":"https://api.github.com/users/faizulhaque-tp/followers","following_url":"https://api.github.com/users/faizulhaque-tp/following{/other_user}","gists_url":"https://api.github.com/users/faizulhaque-tp/gists{/gist_id}","starred_url":"https://api.github.com/users/faizulhaque-tp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faizulhaque-tp/subscriptions","organizations_url":"https://api.github.com/users/faizulhaque-tp/orgs","repos_url":"https://api.github.com/users/faizulhaque-tp/repos","events_url":"https://api.github.com/users/faizulhaque-tp/events{/privacy}","received_events_url":"https://api.github.com/users/faizulhaque-tp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/faizulhaque-tp/dynamic-BE","description":"","fork":false,"url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE","forks_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/forks","keys_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/teams","hooks_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/hooks","issue_events_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/issues/events{/number}","events_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/events","assignees_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/assignees{/user}","branches_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/branches{/branch}","tags_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/tags","blobs_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/git/refs{/sha}","trees_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/statuses/{sha}","languages_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/languages","stargazers_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/stargazers","contributors_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/contributors","subscribers_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/subscribers","subscription_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/subscription","commits_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/commits{/sha}","git_commits_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/git/commits{/sha}","comments_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/comments{/number}","issue_comment_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/issues/comments{/number}","contents_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/contents/{+path}","compare_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/merges","archive_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/downloads","issues_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/issues{/number}","pulls_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls{/number}","milestones_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/milestones{/number}","notifications_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/labels{/name}","releases_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/releases{/id}","deployments_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/deployments","created_at":"2016-02-15T06:41:45Z","updated_at":"2016-02-15T06:41:45Z","pushed_at":"2016-03-11T10:52:48Z","git_url":"git://github.com/faizulhaque-tp/dynamic-BE.git","ssh_url":"git@github.com:faizulhaque-tp/dynamic-BE.git","clone_url":"https://github.com/faizulhaque-tp/dynamic-BE.git","svn_url":"https://github.com/faizulhaque-tp/dynamic-BE","homepage":null,"size":47,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"faizulhaque-tp:development_new","ref":"development_new","sha":"5c15ad4924daf56a7e647628acaf4a7665f1c594","user":{"login":"faizulhaque-tp","id":5235651,"avatar_url":"https://avatars.githubusercontent.com/u/5235651?v=3","gravatar_id":"","url":"https://api.github.com/users/faizulhaque-tp","html_url":"https://github.com/faizulhaque-tp","followers_url":"https://api.github.com/users/faizulhaque-tp/followers","following_url":"https://api.github.com/users/faizulhaque-tp/following{/other_user}","gists_url":"https://api.github.com/users/faizulhaque-tp/gists{/gist_id}","starred_url":"https://api.github.com/users/faizulhaque-tp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faizulhaque-tp/subscriptions","organizations_url":"https://api.github.com/users/faizulhaque-tp/orgs","repos_url":"https://api.github.com/users/faizulhaque-tp/repos","events_url":"https://api.github.com/users/faizulhaque-tp/events{/privacy}","received_events_url":"https://api.github.com/users/faizulhaque-tp/received_events","type":"User","site_admin":false},"repo":{"id":51735991,"name":"dynamic-BE","full_name":"faizulhaque-tp/dynamic-BE","owner":{"login":"faizulhaque-tp","id":5235651,"avatar_url":"https://avatars.githubusercontent.com/u/5235651?v=3","gravatar_id":"","url":"https://api.github.com/users/faizulhaque-tp","html_url":"https://github.com/faizulhaque-tp","followers_url":"https://api.github.com/users/faizulhaque-tp/followers","following_url":"https://api.github.com/users/faizulhaque-tp/following{/other_user}","gists_url":"https://api.github.com/users/faizulhaque-tp/gists{/gist_id}","starred_url":"https://api.github.com/users/faizulhaque-tp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/faizulhaque-tp/subscriptions","organizations_url":"https://api.github.com/users/faizulhaque-tp/orgs","repos_url":"https://api.github.com/users/faizulhaque-tp/repos","events_url":"https://api.github.com/users/faizulhaque-tp/events{/privacy}","received_events_url":"https://api.github.com/users/faizulhaque-tp/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/faizulhaque-tp/dynamic-BE","description":"","fork":false,"url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE","forks_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/forks","keys_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/keys{/key_id}","collaborators_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/teams","hooks_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/hooks","issue_events_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/issues/events{/number}","events_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/events","assignees_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/assignees{/user}","branches_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/branches{/branch}","tags_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/tags","blobs_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/git/refs{/sha}","trees_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/git/trees{/sha}","statuses_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/statuses/{sha}","languages_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/languages","stargazers_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/stargazers","contributors_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/contributors","subscribers_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/subscribers","subscription_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/subscription","commits_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/commits{/sha}","git_commits_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/git/commits{/sha}","comments_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/comments{/number}","issue_comment_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/issues/comments{/number}","contents_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/contents/{+path}","compare_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/compare/{base}...{head}","merges_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/merges","archive_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/downloads","issues_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/issues{/number}","pulls_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls{/number}","milestones_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/milestones{/number}","notifications_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/labels{/name}","releases_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/releases{/id}","deployments_url":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/deployments","created_at":"2016-02-15T06:41:45Z","updated_at":"2016-02-15T06:41:45Z","pushed_at":"2016-03-11T10:52:48Z","git_url":"git://github.com/faizulhaque-tp/dynamic-BE.git","ssh_url":"git@github.com:faizulhaque-tp/dynamic-BE.git","clone_url":"https://github.com/faizulhaque-tp/dynamic-BE.git","svn_url":"https://github.com/faizulhaque-tp/dynamic-BE","homepage":null,"size":47,"stargazers_count":0,"watchers_count":0,"language":null,"has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/5"},"html":{"href":"https://github.com/faizulhaque-tp/dynamic-BE/pull/5"},"issue":{"href":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/issues/5"},"comments":{"href":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/faizulhaque-tp/dynamic-BE/statuses/382a9e243b84960de67a6e5682bc25df8a408964"}}}}