{"action":"created","comment":{"url":"https://api.github.com/repos/osuosl/timesync-node/pulls/comments/35903756","id":35903756,"diff_hunk":"@@ -9,83 +9,34 @@ module.exports = function(app) {\n                 return res.send([]);\n             }\n \n-            knex('activityslugs').then(function(slugs) {\n+            return res.send(activities);\n \n-                var idActivityMap = {};\n-                for (var i = 0, len = activities.length; i < len; i++) {\n-                    activities[i].slugs = [];\n-                    idActivityMap[activities[i].id] = activities[i];\n-                }\n-\n-                for (i = 0, len = slugs.length; i < len; i++) {\n-                    idActivityMap[slugs[i].activity].slugs.push(\n-                        slugs[i].name);\n-                }\n-\n-                return res.send(activities);\n-            });\n+        }).error(function(error) {\n+            var err = errors.errorServerError(error);\n+            return res.status(err.status).send(err);\n         });\n     });\n \n     app.get(app.get('version') + '/activities/:slug', function(req, res) {\n \n-        /*\n-        * Gets an activity and list of slugs from a slug.\n-        *\n-        * First selects an activity from the name of a slug (from the URI).\n-        * Then selects all slug names which match that activity.\n-        * Resulting table will look like this:\n-        *\n-        * +----+-------------+-------------+","path":"src/activities.js","position":35,"original_position":35,"commit_id":"4266b21a8779a81ca1fd14b6e3c3dcfb9eb2093f","original_commit_id":"4266b21a8779a81ca1fd14b6e3c3dcfb9eb2093f","user":{"login":"ElijahCaine","id":1897147,"avatar_url":"https://avatars.githubusercontent.com/u/1897147?v=3","gravatar_id":"","url":"https://api.github.com/users/ElijahCaine","html_url":"https://github.com/ElijahCaine","followers_url":"https://api.github.com/users/ElijahCaine/followers","following_url":"https://api.github.com/users/ElijahCaine/following{/other_user}","gists_url":"https://api.github.com/users/ElijahCaine/gists{/gist_id}","starred_url":"https://api.github.com/users/ElijahCaine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ElijahCaine/subscriptions","organizations_url":"https://api.github.com/users/ElijahCaine/orgs","repos_url":"https://api.github.com/users/ElijahCaine/repos","events_url":"https://api.github.com/users/ElijahCaine/events{/privacy}","received_events_url":"https://api.github.com/users/ElijahCaine/received_events","type":"User","site_admin":false},"body":"I am also confused about why this is being deleted. I seem to recall someone in a meat-space context talking about how it may become outdated, but that doesn't really make sense for deleting it.","created_at":"2015-07-30T18:31:49Z","updated_at":"2015-07-30T18:31:49Z","html_url":"https://github.com/osuosl/timesync-node/pull/12#discussion_r35903756","pull_request_url":"https://api.github.com/repos/osuosl/timesync-node/pulls/12","_links":{"self":{"href":"https://api.github.com/repos/osuosl/timesync-node/pulls/comments/35903756"},"html":{"href":"https://github.com/osuosl/timesync-node/pull/12#discussion_r35903756"},"pull_request":{"href":"https://api.github.com/repos/osuosl/timesync-node/pulls/12"}}},"pull_request":{"url":"https://api.github.com/repos/osuosl/timesync-node/pulls/12","id":38936391,"html_url":"https://github.com/osuosl/timesync-node/pull/12","diff_url":"https://github.com/osuosl/timesync-node/pull/12.diff","patch_url":"https://github.com/osuosl/timesync-node/pull/12.patch","issue_url":"https://api.github.com/repos/osuosl/timesync-node/issues/12","number":12,"state":"open","locked":false,"title":"Rewrite error codes and remove activityslugs table and set time-activity as many-to-many","user":{"login":"LyonesGamer","id":2058985,"avatar_url":"https://avatars.githubusercontent.com/u/2058985?v=3","gravatar_id":"","url":"https://api.github.com/users/LyonesGamer","html_url":"https://github.com/LyonesGamer","followers_url":"https://api.github.com/users/LyonesGamer/followers","following_url":"https://api.github.com/users/LyonesGamer/following{/other_user}","gists_url":"https://api.github.com/users/LyonesGamer/gists{/gist_id}","starred_url":"https://api.github.com/users/LyonesGamer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LyonesGamer/subscriptions","organizations_url":"https://api.github.com/users/LyonesGamer/orgs","repos_url":"https://api.github.com/users/LyonesGamer/repos","events_url":"https://api.github.com/users/LyonesGamer/events{/privacy}","received_events_url":"https://api.github.com/users/LyonesGamer/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-30T23:48:45Z","updated_at":"2015-07-30T18:31:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1ea1af7f26a0b17d780252ce1bff9d46d96ccb3d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/osuosl/timesync-node/pulls/12/commits","review_comments_url":"https://api.github.com/repos/osuosl/timesync-node/pulls/12/comments","review_comment_url":"https://api.github.com/repos/osuosl/timesync-node/pulls/comments{/number}","comments_url":"https://api.github.com/repos/osuosl/timesync-node/issues/12/comments","statuses_url":"https://api.github.com/repos/osuosl/timesync-node/statuses/4266b21a8779a81ca1fd14b6e3c3dcfb9eb2093f","head":{"label":"osuosl:tristan/add-error-checking","ref":"tristan/add-error-checking","sha":"4266b21a8779a81ca1fd14b6e3c3dcfb9eb2093f","user":{"login":"osuosl","id":1380625,"avatar_url":"https://avatars.githubusercontent.com/u/1380625?v=3","gravatar_id":"","url":"https://api.github.com/users/osuosl","html_url":"https://github.com/osuosl","followers_url":"https://api.github.com/users/osuosl/followers","following_url":"https://api.github.com/users/osuosl/following{/other_user}","gists_url":"https://api.github.com/users/osuosl/gists{/gist_id}","starred_url":"https://api.github.com/users/osuosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osuosl/subscriptions","organizations_url":"https://api.github.com/users/osuosl/orgs","repos_url":"https://api.github.com/users/osuosl/repos","events_url":"https://api.github.com/users/osuosl/events{/privacy}","received_events_url":"https://api.github.com/users/osuosl/received_events","type":"Organization","site_admin":false},"repo":{"id":33685026,"name":"timesync-node","full_name":"osuosl/timesync-node","owner":{"login":"osuosl","id":1380625,"avatar_url":"https://avatars.githubusercontent.com/u/1380625?v=3","gravatar_id":"","url":"https://api.github.com/users/osuosl","html_url":"https://github.com/osuosl","followers_url":"https://api.github.com/users/osuosl/followers","following_url":"https://api.github.com/users/osuosl/following{/other_user}","gists_url":"https://api.github.com/users/osuosl/gists{/gist_id}","starred_url":"https://api.github.com/users/osuosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osuosl/subscriptions","organizations_url":"https://api.github.com/users/osuosl/orgs","repos_url":"https://api.github.com/users/osuosl/repos","events_url":"https://api.github.com/users/osuosl/events{/privacy}","received_events_url":"https://api.github.com/users/osuosl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/osuosl/timesync-node","description":"Time Tracking API","fork":false,"url":"https://api.github.com/repos/osuosl/timesync-node","forks_url":"https://api.github.com/repos/osuosl/timesync-node/forks","keys_url":"https://api.github.com/repos/osuosl/timesync-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osuosl/timesync-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osuosl/timesync-node/teams","hooks_url":"https://api.github.com/repos/osuosl/timesync-node/hooks","issue_events_url":"https://api.github.com/repos/osuosl/timesync-node/issues/events{/number}","events_url":"https://api.github.com/repos/osuosl/timesync-node/events","assignees_url":"https://api.github.com/repos/osuosl/timesync-node/assignees{/user}","branches_url":"https://api.github.com/repos/osuosl/timesync-node/branches{/branch}","tags_url":"https://api.github.com/repos/osuosl/timesync-node/tags","blobs_url":"https://api.github.com/repos/osuosl/timesync-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osuosl/timesync-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osuosl/timesync-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/osuosl/timesync-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osuosl/timesync-node/statuses/{sha}","languages_url":"https://api.github.com/repos/osuosl/timesync-node/languages","stargazers_url":"https://api.github.com/repos/osuosl/timesync-node/stargazers","contributors_url":"https://api.github.com/repos/osuosl/timesync-node/contributors","subscribers_url":"https://api.github.com/repos/osuosl/timesync-node/subscribers","subscription_url":"https://api.github.com/repos/osuosl/timesync-node/subscription","commits_url":"https://api.github.com/repos/osuosl/timesync-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/osuosl/timesync-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/osuosl/timesync-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/osuosl/timesync-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/osuosl/timesync-node/contents/{+path}","compare_url":"https://api.github.com/repos/osuosl/timesync-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osuosl/timesync-node/merges","archive_url":"https://api.github.com/repos/osuosl/timesync-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osuosl/timesync-node/downloads","issues_url":"https://api.github.com/repos/osuosl/timesync-node/issues{/number}","pulls_url":"https://api.github.com/repos/osuosl/timesync-node/pulls{/number}","milestones_url":"https://api.github.com/repos/osuosl/timesync-node/milestones{/number}","notifications_url":"https://api.github.com/repos/osuosl/timesync-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osuosl/timesync-node/labels{/name}","releases_url":"https://api.github.com/repos/osuosl/timesync-node/releases{/id}","created_at":"2015-04-09T18:20:54Z","updated_at":"2015-07-16T19:01:40Z","pushed_at":"2015-07-30T18:13:12Z","git_url":"git://github.com/osuosl/timesync-node.git","ssh_url":"git@github.com:osuosl/timesync-node.git","clone_url":"https://github.com/osuosl/timesync-node.git","svn_url":"https://github.com/osuosl/timesync-node","homepage":null,"size":943,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":35,"forks":1,"open_issues":35,"watchers":0,"default_branch":"develop"}},"base":{"label":"osuosl:develop","ref":"develop","sha":"5d0be4dbd2532fb918bb87ea3354170c478928cc","user":{"login":"osuosl","id":1380625,"avatar_url":"https://avatars.githubusercontent.com/u/1380625?v=3","gravatar_id":"","url":"https://api.github.com/users/osuosl","html_url":"https://github.com/osuosl","followers_url":"https://api.github.com/users/osuosl/followers","following_url":"https://api.github.com/users/osuosl/following{/other_user}","gists_url":"https://api.github.com/users/osuosl/gists{/gist_id}","starred_url":"https://api.github.com/users/osuosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osuosl/subscriptions","organizations_url":"https://api.github.com/users/osuosl/orgs","repos_url":"https://api.github.com/users/osuosl/repos","events_url":"https://api.github.com/users/osuosl/events{/privacy}","received_events_url":"https://api.github.com/users/osuosl/received_events","type":"Organization","site_admin":false},"repo":{"id":33685026,"name":"timesync-node","full_name":"osuosl/timesync-node","owner":{"login":"osuosl","id":1380625,"avatar_url":"https://avatars.githubusercontent.com/u/1380625?v=3","gravatar_id":"","url":"https://api.github.com/users/osuosl","html_url":"https://github.com/osuosl","followers_url":"https://api.github.com/users/osuosl/followers","following_url":"https://api.github.com/users/osuosl/following{/other_user}","gists_url":"https://api.github.com/users/osuosl/gists{/gist_id}","starred_url":"https://api.github.com/users/osuosl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/osuosl/subscriptions","organizations_url":"https://api.github.com/users/osuosl/orgs","repos_url":"https://api.github.com/users/osuosl/repos","events_url":"https://api.github.com/users/osuosl/events{/privacy}","received_events_url":"https://api.github.com/users/osuosl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/osuosl/timesync-node","description":"Time Tracking API","fork":false,"url":"https://api.github.com/repos/osuosl/timesync-node","forks_url":"https://api.github.com/repos/osuosl/timesync-node/forks","keys_url":"https://api.github.com/repos/osuosl/timesync-node/keys{/key_id}","collaborators_url":"https://api.github.com/repos/osuosl/timesync-node/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/osuosl/timesync-node/teams","hooks_url":"https://api.github.com/repos/osuosl/timesync-node/hooks","issue_events_url":"https://api.github.com/repos/osuosl/timesync-node/issues/events{/number}","events_url":"https://api.github.com/repos/osuosl/timesync-node/events","assignees_url":"https://api.github.com/repos/osuosl/timesync-node/assignees{/user}","branches_url":"https://api.github.com/repos/osuosl/timesync-node/branches{/branch}","tags_url":"https://api.github.com/repos/osuosl/timesync-node/tags","blobs_url":"https://api.github.com/repos/osuosl/timesync-node/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/osuosl/timesync-node/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/osuosl/timesync-node/git/refs{/sha}","trees_url":"https://api.github.com/repos/osuosl/timesync-node/git/trees{/sha}","statuses_url":"https://api.github.com/repos/osuosl/timesync-node/statuses/{sha}","languages_url":"https://api.github.com/repos/osuosl/timesync-node/languages","stargazers_url":"https://api.github.com/repos/osuosl/timesync-node/stargazers","contributors_url":"https://api.github.com/repos/osuosl/timesync-node/contributors","subscribers_url":"https://api.github.com/repos/osuosl/timesync-node/subscribers","subscription_url":"https://api.github.com/repos/osuosl/timesync-node/subscription","commits_url":"https://api.github.com/repos/osuosl/timesync-node/commits{/sha}","git_commits_url":"https://api.github.com/repos/osuosl/timesync-node/git/commits{/sha}","comments_url":"https://api.github.com/repos/osuosl/timesync-node/comments{/number}","issue_comment_url":"https://api.github.com/repos/osuosl/timesync-node/issues/comments{/number}","contents_url":"https://api.github.com/repos/osuosl/timesync-node/contents/{+path}","compare_url":"https://api.github.com/repos/osuosl/timesync-node/compare/{base}...{head}","merges_url":"https://api.github.com/repos/osuosl/timesync-node/merges","archive_url":"https://api.github.com/repos/osuosl/timesync-node/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/osuosl/timesync-node/downloads","issues_url":"https://api.github.com/repos/osuosl/timesync-node/issues{/number}","pulls_url":"https://api.github.com/repos/osuosl/timesync-node/pulls{/number}","milestones_url":"https://api.github.com/repos/osuosl/timesync-node/milestones{/number}","notifications_url":"https://api.github.com/repos/osuosl/timesync-node/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/osuosl/timesync-node/labels{/name}","releases_url":"https://api.github.com/repos/osuosl/timesync-node/releases{/id}","created_at":"2015-04-09T18:20:54Z","updated_at":"2015-07-16T19:01:40Z","pushed_at":"2015-07-30T18:13:12Z","git_url":"git://github.com/osuosl/timesync-node.git","ssh_url":"git@github.com:osuosl/timesync-node.git","clone_url":"https://github.com/osuosl/timesync-node.git","svn_url":"https://github.com/osuosl/timesync-node","homepage":null,"size":943,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":35,"forks":1,"open_issues":35,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/osuosl/timesync-node/pulls/12"},"html":{"href":"https://github.com/osuosl/timesync-node/pull/12"},"issue":{"href":"https://api.github.com/repos/osuosl/timesync-node/issues/12"},"comments":{"href":"https://api.github.com/repos/osuosl/timesync-node/issues/12/comments"},"review_comments":{"href":"https://api.github.com/repos/osuosl/timesync-node/pulls/12/comments"},"review_comment":{"href":"https://api.github.com/repos/osuosl/timesync-node/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/osuosl/timesync-node/pulls/12/commits"},"statuses":{"href":"https://api.github.com/repos/osuosl/timesync-node/statuses/4266b21a8779a81ca1fd14b6e3c3dcfb9eb2093f"}}}}