{"action":"created","comment":{"url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/comments/212072362","pull_request_review_id":148627101,"id":212072362,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjA3MjM2Mg==","diff_hunk":"@@ -1,4 +1,4 @@\n-from flask import jsonify\n+from flask import jsonify, abort\n \n ","path":"app/api/models.py","position":4,"original_position":4,"commit_id":"2e99e5c027882995b45ebc59d4fb2286852e8d91","original_commit_id":"0e05d2d22cec96d2199523b2e7400d9c08508a4e","user":{"login":"leni1","id":8645218,"node_id":"MDQ6VXNlcjg2NDUyMTg=","avatar_url":"https://avatars0.githubusercontent.com/u/8645218?v=4","gravatar_id":"","url":"https://api.github.com/users/leni1","html_url":"https://github.com/leni1","followers_url":"https://api.github.com/users/leni1/followers","following_url":"https://api.github.com/users/leni1/following{/other_user}","gists_url":"https://api.github.com/users/leni1/gists{/gist_id}","starred_url":"https://api.github.com/users/leni1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/leni1/subscriptions","organizations_url":"https://api.github.com/users/leni1/orgs","repos_url":"https://api.github.com/users/leni1/repos","events_url":"https://api.github.com/users/leni1/events{/privacy}","received_events_url":"https://api.github.com/users/leni1/received_events","type":"User","site_admin":false},"body":"@Eubule on closer inspection your models seem to be behaving as views. Your views should be passing data and returning it. The checks and formatting should (mostly) happen in your models. So `jsonify`, `flask` and `abort` should appear in your controllers (views) and your models should be doing the heavy lifting of entering and returning the correct data. Hope that clarifies it for you. :smile: ","created_at":"2018-08-22T19:04:21Z","updated_at":"2018-08-22T19:04:21Z","html_url":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure/pull/4#discussion_r212072362","pull_request_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/4","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/comments/212072362"},"html":{"href":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure/pull/4#discussion_r212072362"},"pull_request":{"href":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/4"}},"in_reply_to_id":211147767},"pull_request":{"url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/4","id":209370187,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5MzcwMTg3","html_url":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure/pull/4","diff_url":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure/pull/4.diff","patch_url":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure/pull/4.patch","issue_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/issues/4","number":4,"state":"closed","locked":false,"title":"Ch test resources endpoint 159869003","user":{"login":"Eubule","id":18183677,"node_id":"MDQ6VXNlcjE4MTgzNjc3","avatar_url":"https://avatars1.githubusercontent.com/u/18183677?v=4","gravatar_id":"","url":"https://api.github.com/users/Eubule","html_url":"https://github.com/Eubule","followers_url":"https://api.github.com/users/Eubule/followers","following_url":"https://api.github.com/users/Eubule/following{/other_user}","gists_url":"https://api.github.com/users/Eubule/gists{/gist_id}","starred_url":"https://api.github.com/users/Eubule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eubule/subscriptions","organizations_url":"https://api.github.com/users/Eubule/orgs","repos_url":"https://api.github.com/users/Eubule/repos","events_url":"https://api.github.com/users/Eubule/events{/privacy}","received_events_url":"https://api.github.com/users/Eubule/received_events","type":"User","site_admin":false},"body":"@leni1\r\n@araaliFarooq\r\n@oxenprogrammer","created_at":"2018-08-19T17:18:38Z","updated_at":"2018-08-22T19:04:21Z","closed_at":"2018-08-19T17:19:35Z","merged_at":"2018-08-19T17:19:35Z","merge_commit_sha":"a00515de3700d00c06c8954eb2f1db754c12a440","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/4/commits","review_comments_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/4/comments","review_comment_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/issues/4/comments","statuses_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/statuses/2e99e5c027882995b45ebc59d4fb2286852e8d91","head":{"label":"Eubule:ch-test-resources-endpoint-159869003","ref":"ch-test-resources-endpoint-159869003","sha":"2e99e5c027882995b45ebc59d4fb2286852e8d91","user":{"login":"Eubule","id":18183677,"node_id":"MDQ6VXNlcjE4MTgzNjc3","avatar_url":"https://avatars1.githubusercontent.com/u/18183677?v=4","gravatar_id":"","url":"https://api.github.com/users/Eubule","html_url":"https://github.com/Eubule","followers_url":"https://api.github.com/users/Eubule/followers","following_url":"https://api.github.com/users/Eubule/following{/other_user}","gists_url":"https://api.github.com/users/Eubule/gists{/gist_id}","starred_url":"https://api.github.com/users/Eubule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eubule/subscriptions","organizations_url":"https://api.github.com/users/Eubule/orgs","repos_url":"https://api.github.com/users/Eubule/repos","events_url":"https://api.github.com/users/Eubule/events{/privacy}","received_events_url":"https://api.github.com/users/Eubule/received_events","type":"User","site_admin":false},"repo":{"id":144891797,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ4OTE3OTc=","name":"Stackoverflow-lite-with-datastructure","full_name":"Eubule/Stackoverflow-lite-with-datastructure","owner":{"login":"Eubule","id":18183677,"node_id":"MDQ6VXNlcjE4MTgzNjc3","avatar_url":"https://avatars1.githubusercontent.com/u/18183677?v=4","gravatar_id":"","url":"https://api.github.com/users/Eubule","html_url":"https://github.com/Eubule","followers_url":"https://api.github.com/users/Eubule/followers","following_url":"https://api.github.com/users/Eubule/following{/other_user}","gists_url":"https://api.github.com/users/Eubule/gists{/gist_id}","starred_url":"https://api.github.com/users/Eubule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eubule/subscriptions","organizations_url":"https://api.github.com/users/Eubule/orgs","repos_url":"https://api.github.com/users/Eubule/repos","events_url":"https://api.github.com/users/Eubule/events{/privacy}","received_events_url":"https://api.github.com/users/Eubule/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure","description":null,"fork":false,"url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure","forks_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/forks","keys_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/teams","hooks_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/hooks","issue_events_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/issues/events{/number}","events_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/events","assignees_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/assignees{/user}","branches_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/branches{/branch}","tags_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/tags","blobs_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/git/refs{/sha}","trees_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/statuses/{sha}","languages_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/languages","stargazers_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/stargazers","contributors_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/contributors","subscribers_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/subscribers","subscription_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/subscription","commits_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/commits{/sha}","git_commits_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/git/commits{/sha}","comments_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/comments{/number}","issue_comment_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/issues/comments{/number}","contents_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/contents/{+path}","compare_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/merges","archive_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/downloads","issues_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/issues{/number}","pulls_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls{/number}","milestones_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/milestones{/number}","notifications_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/labels{/name}","releases_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/releases{/id}","deployments_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/deployments","created_at":"2018-08-15T18:55:48Z","updated_at":"2018-08-22T10:49:32Z","pushed_at":"2018-08-22T14:36:34Z","git_url":"git://github.com/Eubule/Stackoverflow-lite-with-datastructure.git","ssh_url":"git@github.com:Eubule/Stackoverflow-lite-with-datastructure.git","clone_url":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure.git","svn_url":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure","homepage":null,"size":31,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"Eubule:develop","ref":"develop","sha":"03aba4d01547a9b36b2006bfe38e3c50d9cb622b","user":{"login":"Eubule","id":18183677,"node_id":"MDQ6VXNlcjE4MTgzNjc3","avatar_url":"https://avatars1.githubusercontent.com/u/18183677?v=4","gravatar_id":"","url":"https://api.github.com/users/Eubule","html_url":"https://github.com/Eubule","followers_url":"https://api.github.com/users/Eubule/followers","following_url":"https://api.github.com/users/Eubule/following{/other_user}","gists_url":"https://api.github.com/users/Eubule/gists{/gist_id}","starred_url":"https://api.github.com/users/Eubule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eubule/subscriptions","organizations_url":"https://api.github.com/users/Eubule/orgs","repos_url":"https://api.github.com/users/Eubule/repos","events_url":"https://api.github.com/users/Eubule/events{/privacy}","received_events_url":"https://api.github.com/users/Eubule/received_events","type":"User","site_admin":false},"repo":{"id":144891797,"node_id":"MDEwOlJlcG9zaXRvcnkxNDQ4OTE3OTc=","name":"Stackoverflow-lite-with-datastructure","full_name":"Eubule/Stackoverflow-lite-with-datastructure","owner":{"login":"Eubule","id":18183677,"node_id":"MDQ6VXNlcjE4MTgzNjc3","avatar_url":"https://avatars1.githubusercontent.com/u/18183677?v=4","gravatar_id":"","url":"https://api.github.com/users/Eubule","html_url":"https://github.com/Eubule","followers_url":"https://api.github.com/users/Eubule/followers","following_url":"https://api.github.com/users/Eubule/following{/other_user}","gists_url":"https://api.github.com/users/Eubule/gists{/gist_id}","starred_url":"https://api.github.com/users/Eubule/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eubule/subscriptions","organizations_url":"https://api.github.com/users/Eubule/orgs","repos_url":"https://api.github.com/users/Eubule/repos","events_url":"https://api.github.com/users/Eubule/events{/privacy}","received_events_url":"https://api.github.com/users/Eubule/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure","description":null,"fork":false,"url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure","forks_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/forks","keys_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/teams","hooks_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/hooks","issue_events_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/issues/events{/number}","events_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/events","assignees_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/assignees{/user}","branches_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/branches{/branch}","tags_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/tags","blobs_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/git/refs{/sha}","trees_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/statuses/{sha}","languages_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/languages","stargazers_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/stargazers","contributors_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/contributors","subscribers_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/subscribers","subscription_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/subscription","commits_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/commits{/sha}","git_commits_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/git/commits{/sha}","comments_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/comments{/number}","issue_comment_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/issues/comments{/number}","contents_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/contents/{+path}","compare_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/merges","archive_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/downloads","issues_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/issues{/number}","pulls_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls{/number}","milestones_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/milestones{/number}","notifications_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/labels{/name}","releases_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/releases{/id}","deployments_url":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/deployments","created_at":"2018-08-15T18:55:48Z","updated_at":"2018-08-22T10:49:32Z","pushed_at":"2018-08-22T14:36:34Z","git_url":"git://github.com/Eubule/Stackoverflow-lite-with-datastructure.git","ssh_url":"git@github.com:Eubule/Stackoverflow-lite-with-datastructure.git","clone_url":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure.git","svn_url":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure","homepage":null,"size":31,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/4"},"html":{"href":"https://github.com/Eubule/Stackoverflow-lite-with-datastructure/pull/4"},"issue":{"href":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/issues/4"},"comments":{"href":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/issues/4/comments"},"review_comments":{"href":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/4/comments"},"review_comment":{"href":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/pulls/4/commits"},"statuses":{"href":"https://api.github.com/repos/Eubule/Stackoverflow-lite-with-datastructure/statuses/2e99e5c027882995b45ebc59d4fb2286852e8d91"}},"author_association":"OWNER"}}
{"actor":{"display_login":"leni1"}}