{"action":"created","comment":{"url":"https://api.github.com/repos/maciejkamela/villageApi/pulls/comments/49650632","id":49650632,"diff_hunk":"@@ -0,0 +1,93 @@\n+/**\n+ * Created by camel on 2016-01-06.\n+ */\n+var models = require('../models');\n+\n+module.exports = (function () {\n+    return {\n+        getSingleArticle: function (req, res) {\n+            models.articles.getSingleArticle(req.params.id)\n+                .then(function (article) {\n+                    if (req.params.id != parseInt(req.params.id, 10)){\n+                        res.send({status: 'error', error: 'Id is not an integer.'});","path":"apiMethods/articlesMethods.js","position":12,"original_position":12,"commit_id":"e687a861ffe44dab91dadfaa44bc3a394231a585","original_commit_id":"e687a861ffe44dab91dadfaa44bc3a394231a585","user":{"login":"robhil","id":8972979,"avatar_url":"https://avatars.githubusercontent.com/u/8972979?v=3","gravatar_id":"","url":"https://api.github.com/users/robhil","html_url":"https://github.com/robhil","followers_url":"https://api.github.com/users/robhil/followers","following_url":"https://api.github.com/users/robhil/following{/other_user}","gists_url":"https://api.github.com/users/robhil/gists{/gist_id}","starred_url":"https://api.github.com/users/robhil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robhil/subscriptions","organizations_url":"https://api.github.com/users/robhil/orgs","repos_url":"https://api.github.com/users/robhil/repos","events_url":"https://api.github.com/users/robhil/events{/privacy}","received_events_url":"https://api.github.com/users/robhil/received_events","type":"User","site_admin":false},"body":"troche w ogole bez sensu to jest, bo sprawdzasz ten parametr juz po wywolaniu zapytania do bazy \r\ntutaj masz cos ciekawego do walidacji parametrow https://github.com/ctavan/express-validator \r\n\r\n\r\n\r\n\r\n\r\n\r\n","created_at":"2016-01-13T21:08:14Z","updated_at":"2016-01-13T21:08:14Z","html_url":"https://github.com/maciejkamela/villageApi/pull/1#discussion_r49650632","pull_request_url":"https://api.github.com/repos/maciejkamela/villageApi/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/maciejkamela/villageApi/pulls/comments/49650632"},"html":{"href":"https://github.com/maciejkamela/villageApi/pull/1#discussion_r49650632"},"pull_request":{"href":"https://api.github.com/repos/maciejkamela/villageApi/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/maciejkamela/villageApi/pulls/1","id":55954609,"html_url":"https://github.com/maciejkamela/villageApi/pull/1","diff_url":"https://github.com/maciejkamela/villageApi/pull/1.diff","patch_url":"https://github.com/maciejkamela/villageApi/pull/1.patch","issue_url":"https://api.github.com/repos/maciejkamela/villageApi/issues/1","number":1,"state":"open","locked":false,"title":"Feature/orm sequelize","user":{"login":"robhil","id":8972979,"avatar_url":"https://avatars.githubusercontent.com/u/8972979?v=3","gravatar_id":"","url":"https://api.github.com/users/robhil","html_url":"https://github.com/robhil","followers_url":"https://api.github.com/users/robhil/followers","following_url":"https://api.github.com/users/robhil/following{/other_user}","gists_url":"https://api.github.com/users/robhil/gists{/gist_id}","starred_url":"https://api.github.com/users/robhil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robhil/subscriptions","organizations_url":"https://api.github.com/users/robhil/orgs","repos_url":"https://api.github.com/users/robhil/repos","events_url":"https://api.github.com/users/robhil/events{/privacy}","received_events_url":"https://api.github.com/users/robhil/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-13T20:58:36Z","updated_at":"2016-01-13T21:08:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b89c376d93777f48ba29ef3bda29332fb292a93","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/maciejkamela/villageApi/pulls/1/commits","review_comments_url":"https://api.github.com/repos/maciejkamela/villageApi/pulls/1/comments","review_comment_url":"https://api.github.com/repos/maciejkamela/villageApi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/maciejkamela/villageApi/issues/1/comments","statuses_url":"https://api.github.com/repos/maciejkamela/villageApi/statuses/e687a861ffe44dab91dadfaa44bc3a394231a585","head":{"label":"maciejkamela:feature/orm-sequelize","ref":"feature/orm-sequelize","sha":"e687a861ffe44dab91dadfaa44bc3a394231a585","user":{"login":"maciejkamela","id":13169836,"avatar_url":"https://avatars.githubusercontent.com/u/13169836?v=3","gravatar_id":"","url":"https://api.github.com/users/maciejkamela","html_url":"https://github.com/maciejkamela","followers_url":"https://api.github.com/users/maciejkamela/followers","following_url":"https://api.github.com/users/maciejkamela/following{/other_user}","gists_url":"https://api.github.com/users/maciejkamela/gists{/gist_id}","starred_url":"https://api.github.com/users/maciejkamela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciejkamela/subscriptions","organizations_url":"https://api.github.com/users/maciejkamela/orgs","repos_url":"https://api.github.com/users/maciejkamela/repos","events_url":"https://api.github.com/users/maciejkamela/events{/privacy}","received_events_url":"https://api.github.com/users/maciejkamela/received_events","type":"User","site_admin":false},"repo":{"id":48135034,"name":"villageApi","full_name":"maciejkamela/villageApi","owner":{"login":"maciejkamela","id":13169836,"avatar_url":"https://avatars.githubusercontent.com/u/13169836?v=3","gravatar_id":"","url":"https://api.github.com/users/maciejkamela","html_url":"https://github.com/maciejkamela","followers_url":"https://api.github.com/users/maciejkamela/followers","following_url":"https://api.github.com/users/maciejkamela/following{/other_user}","gists_url":"https://api.github.com/users/maciejkamela/gists{/gist_id}","starred_url":"https://api.github.com/users/maciejkamela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciejkamela/subscriptions","organizations_url":"https://api.github.com/users/maciejkamela/orgs","repos_url":"https://api.github.com/users/maciejkamela/repos","events_url":"https://api.github.com/users/maciejkamela/events{/privacy}","received_events_url":"https://api.github.com/users/maciejkamela/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maciejkamela/villageApi","description":"","fork":false,"url":"https://api.github.com/repos/maciejkamela/villageApi","forks_url":"https://api.github.com/repos/maciejkamela/villageApi/forks","keys_url":"https://api.github.com/repos/maciejkamela/villageApi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maciejkamela/villageApi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maciejkamela/villageApi/teams","hooks_url":"https://api.github.com/repos/maciejkamela/villageApi/hooks","issue_events_url":"https://api.github.com/repos/maciejkamela/villageApi/issues/events{/number}","events_url":"https://api.github.com/repos/maciejkamela/villageApi/events","assignees_url":"https://api.github.com/repos/maciejkamela/villageApi/assignees{/user}","branches_url":"https://api.github.com/repos/maciejkamela/villageApi/branches{/branch}","tags_url":"https://api.github.com/repos/maciejkamela/villageApi/tags","blobs_url":"https://api.github.com/repos/maciejkamela/villageApi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maciejkamela/villageApi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maciejkamela/villageApi/git/refs{/sha}","trees_url":"https://api.github.com/repos/maciejkamela/villageApi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maciejkamela/villageApi/statuses/{sha}","languages_url":"https://api.github.com/repos/maciejkamela/villageApi/languages","stargazers_url":"https://api.github.com/repos/maciejkamela/villageApi/stargazers","contributors_url":"https://api.github.com/repos/maciejkamela/villageApi/contributors","subscribers_url":"https://api.github.com/repos/maciejkamela/villageApi/subscribers","subscription_url":"https://api.github.com/repos/maciejkamela/villageApi/subscription","commits_url":"https://api.github.com/repos/maciejkamela/villageApi/commits{/sha}","git_commits_url":"https://api.github.com/repos/maciejkamela/villageApi/git/commits{/sha}","comments_url":"https://api.github.com/repos/maciejkamela/villageApi/comments{/number}","issue_comment_url":"https://api.github.com/repos/maciejkamela/villageApi/issues/comments{/number}","contents_url":"https://api.github.com/repos/maciejkamela/villageApi/contents/{+path}","compare_url":"https://api.github.com/repos/maciejkamela/villageApi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maciejkamela/villageApi/merges","archive_url":"https://api.github.com/repos/maciejkamela/villageApi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maciejkamela/villageApi/downloads","issues_url":"https://api.github.com/repos/maciejkamela/villageApi/issues{/number}","pulls_url":"https://api.github.com/repos/maciejkamela/villageApi/pulls{/number}","milestones_url":"https://api.github.com/repos/maciejkamela/villageApi/milestones{/number}","notifications_url":"https://api.github.com/repos/maciejkamela/villageApi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maciejkamela/villageApi/labels{/name}","releases_url":"https://api.github.com/repos/maciejkamela/villageApi/releases{/id}","created_at":"2015-12-16T21:03:14Z","updated_at":"2015-12-16T21:07:06Z","pushed_at":"2016-01-13T20:58:36Z","git_url":"git://github.com/maciejkamela/villageApi.git","ssh_url":"git@github.com:maciejkamela/villageApi.git","clone_url":"https://github.com/maciejkamela/villageApi.git","svn_url":"https://github.com/maciejkamela/villageApi","homepage":null,"size":21,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"maciejkamela:master","ref":"master","sha":"9e12f154074bd0abc7aa46365c6e05f2428f7cf3","user":{"login":"maciejkamela","id":13169836,"avatar_url":"https://avatars.githubusercontent.com/u/13169836?v=3","gravatar_id":"","url":"https://api.github.com/users/maciejkamela","html_url":"https://github.com/maciejkamela","followers_url":"https://api.github.com/users/maciejkamela/followers","following_url":"https://api.github.com/users/maciejkamela/following{/other_user}","gists_url":"https://api.github.com/users/maciejkamela/gists{/gist_id}","starred_url":"https://api.github.com/users/maciejkamela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciejkamela/subscriptions","organizations_url":"https://api.github.com/users/maciejkamela/orgs","repos_url":"https://api.github.com/users/maciejkamela/repos","events_url":"https://api.github.com/users/maciejkamela/events{/privacy}","received_events_url":"https://api.github.com/users/maciejkamela/received_events","type":"User","site_admin":false},"repo":{"id":48135034,"name":"villageApi","full_name":"maciejkamela/villageApi","owner":{"login":"maciejkamela","id":13169836,"avatar_url":"https://avatars.githubusercontent.com/u/13169836?v=3","gravatar_id":"","url":"https://api.github.com/users/maciejkamela","html_url":"https://github.com/maciejkamela","followers_url":"https://api.github.com/users/maciejkamela/followers","following_url":"https://api.github.com/users/maciejkamela/following{/other_user}","gists_url":"https://api.github.com/users/maciejkamela/gists{/gist_id}","starred_url":"https://api.github.com/users/maciejkamela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maciejkamela/subscriptions","organizations_url":"https://api.github.com/users/maciejkamela/orgs","repos_url":"https://api.github.com/users/maciejkamela/repos","events_url":"https://api.github.com/users/maciejkamela/events{/privacy}","received_events_url":"https://api.github.com/users/maciejkamela/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/maciejkamela/villageApi","description":"","fork":false,"url":"https://api.github.com/repos/maciejkamela/villageApi","forks_url":"https://api.github.com/repos/maciejkamela/villageApi/forks","keys_url":"https://api.github.com/repos/maciejkamela/villageApi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/maciejkamela/villageApi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/maciejkamela/villageApi/teams","hooks_url":"https://api.github.com/repos/maciejkamela/villageApi/hooks","issue_events_url":"https://api.github.com/repos/maciejkamela/villageApi/issues/events{/number}","events_url":"https://api.github.com/repos/maciejkamela/villageApi/events","assignees_url":"https://api.github.com/repos/maciejkamela/villageApi/assignees{/user}","branches_url":"https://api.github.com/repos/maciejkamela/villageApi/branches{/branch}","tags_url":"https://api.github.com/repos/maciejkamela/villageApi/tags","blobs_url":"https://api.github.com/repos/maciejkamela/villageApi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/maciejkamela/villageApi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/maciejkamela/villageApi/git/refs{/sha}","trees_url":"https://api.github.com/repos/maciejkamela/villageApi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/maciejkamela/villageApi/statuses/{sha}","languages_url":"https://api.github.com/repos/maciejkamela/villageApi/languages","stargazers_url":"https://api.github.com/repos/maciejkamela/villageApi/stargazers","contributors_url":"https://api.github.com/repos/maciejkamela/villageApi/contributors","subscribers_url":"https://api.github.com/repos/maciejkamela/villageApi/subscribers","subscription_url":"https://api.github.com/repos/maciejkamela/villageApi/subscription","commits_url":"https://api.github.com/repos/maciejkamela/villageApi/commits{/sha}","git_commits_url":"https://api.github.com/repos/maciejkamela/villageApi/git/commits{/sha}","comments_url":"https://api.github.com/repos/maciejkamela/villageApi/comments{/number}","issue_comment_url":"https://api.github.com/repos/maciejkamela/villageApi/issues/comments{/number}","contents_url":"https://api.github.com/repos/maciejkamela/villageApi/contents/{+path}","compare_url":"https://api.github.com/repos/maciejkamela/villageApi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/maciejkamela/villageApi/merges","archive_url":"https://api.github.com/repos/maciejkamela/villageApi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/maciejkamela/villageApi/downloads","issues_url":"https://api.github.com/repos/maciejkamela/villageApi/issues{/number}","pulls_url":"https://api.github.com/repos/maciejkamela/villageApi/pulls{/number}","milestones_url":"https://api.github.com/repos/maciejkamela/villageApi/milestones{/number}","notifications_url":"https://api.github.com/repos/maciejkamela/villageApi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/maciejkamela/villageApi/labels{/name}","releases_url":"https://api.github.com/repos/maciejkamela/villageApi/releases{/id}","created_at":"2015-12-16T21:03:14Z","updated_at":"2015-12-16T21:07:06Z","pushed_at":"2016-01-13T20:58:36Z","git_url":"git://github.com/maciejkamela/villageApi.git","ssh_url":"git@github.com:maciejkamela/villageApi.git","clone_url":"https://github.com/maciejkamela/villageApi.git","svn_url":"https://github.com/maciejkamela/villageApi","homepage":null,"size":21,"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":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/maciejkamela/villageApi/pulls/1"},"html":{"href":"https://github.com/maciejkamela/villageApi/pull/1"},"issue":{"href":"https://api.github.com/repos/maciejkamela/villageApi/issues/1"},"comments":{"href":"https://api.github.com/repos/maciejkamela/villageApi/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/maciejkamela/villageApi/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/maciejkamela/villageApi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/maciejkamela/villageApi/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/maciejkamela/villageApi/statuses/e687a861ffe44dab91dadfaa44bc3a394231a585"}}}}