{"action":"created","comment":{"url":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/comments/122598978","pull_request_review_id":44728487,"id":122598978,"diff_hunk":"@@ -1,17 +1,22 @@\n import { NextFunction, Request, Response } from \"express\";\n import { IDatabase } from \"pg-promise\";\n import { RecipeMiddleware } from \"./../../../logic/middleware/recipe.middleware\";\n-import { ApiError, ERRORS, Recipe } from \"./../../../models/index\";\n-import { DbExtensions } from \"./../../../models/index\";\n+import { FilesystemImageService, ImageService } from \"./../../../logic/services/index\";\n+import {\n+  ApiError, DataType, DbExtensions, ERRORS, Recipe, SocoboRequest\n+} from \"./../../../models/index\";\n \n export class RecipeHandler {\n \n   private _db: IDatabase<DbExtensions>&DbExtensions;\n   private _recipeMiddleware: RecipeMiddleware;\n+  private _imgService: ImageService;\n \n-  constructor (db: any, recipeMiddleware: RecipeMiddleware) {\n+  constructor (db: any, recipeMiddleware: RecipeMiddleware,\n+               imgService: ImageService) {","path":"server/src/logic/handler/routes/recipe.handler.ts","position":19,"original_position":19,"commit_id":"788d36a1e4030e7694f4e132ced0f3da54b2e6da","original_commit_id":"788d36a1e4030e7694f4e132ced0f3da54b2e6da","user":{"login":"hetec","id":6704069,"avatar_url":"https://avatars0.githubusercontent.com/u/6704069?v=3","gravatar_id":"","url":"https://api.github.com/users/hetec","html_url":"https://github.com/hetec","followers_url":"https://api.github.com/users/hetec/followers","following_url":"https://api.github.com/users/hetec/following{/other_user}","gists_url":"https://api.github.com/users/hetec/gists{/gist_id}","starred_url":"https://api.github.com/users/hetec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hetec/subscriptions","organizations_url":"https://api.github.com/users/hetec/orgs","repos_url":"https://api.github.com/users/hetec/repos","events_url":"https://api.github.com/users/hetec/events{/privacy}","received_events_url":"https://api.github.com/users/hetec/received_events","type":"User","site_admin":false},"body":"Will remove it","created_at":"2017-06-18T19:26:04Z","updated_at":"2017-06-18T19:26:04Z","html_url":"https://github.com/socobo/SocoboPlusPlus/pull/74#discussion_r122598978","pull_request_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/74","_links":{"self":{"href":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/comments/122598978"},"html":{"href":"https://github.com/socobo/SocoboPlusPlus/pull/74#discussion_r122598978"},"pull_request":{"href":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/74"}}},"pull_request":{"url":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/74","id":126168369,"html_url":"https://github.com/socobo/SocoboPlusPlus/pull/74","diff_url":"https://github.com/socobo/SocoboPlusPlus/pull/74.diff","patch_url":"https://github.com/socobo/SocoboPlusPlus/pull/74.patch","issue_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/issues/74","number":74,"state":"open","locked":false,"title":"#70 - implement image upload","user":{"login":"hetec","id":6704069,"avatar_url":"https://avatars0.githubusercontent.com/u/6704069?v=3","gravatar_id":"","url":"https://api.github.com/users/hetec","html_url":"https://github.com/hetec","followers_url":"https://api.github.com/users/hetec/followers","following_url":"https://api.github.com/users/hetec/following{/other_user}","gists_url":"https://api.github.com/users/hetec/gists{/gist_id}","starred_url":"https://api.github.com/users/hetec/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hetec/subscriptions","organizations_url":"https://api.github.com/users/hetec/orgs","repos_url":"https://api.github.com/users/hetec/repos","events_url":"https://api.github.com/users/hetec/events{/privacy}","received_events_url":"https://api.github.com/users/hetec/received_events","type":"User","site_admin":false},"body":"- Create image service to store the image on the file system\r\n- Image service is designed to be reused in for other endpoints (i.e. profile) and different technologies (we can add a implementation to store images at some cloud storage for instance)\r\n- Create image upload endpoint, handler and middleware\r\n- Update the image url in the related recipe database entity\r\n","created_at":"2017-06-17T21:14:51Z","updated_at":"2017-06-18T19:26:04Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d7bea9566b8d23ca5422e4c191709689edb866c6","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/74/commits","review_comments_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/74/comments","review_comment_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/issues/74/comments","statuses_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/statuses/788d36a1e4030e7694f4e132ced0f3da54b2e6da","head":{"label":"socobo:70-implement-image-upload","ref":"70-implement-image-upload","sha":"788d36a1e4030e7694f4e132ced0f3da54b2e6da","user":{"login":"socobo","id":22557786,"avatar_url":"https://avatars0.githubusercontent.com/u/22557786?v=3","gravatar_id":"","url":"https://api.github.com/users/socobo","html_url":"https://github.com/socobo","followers_url":"https://api.github.com/users/socobo/followers","following_url":"https://api.github.com/users/socobo/following{/other_user}","gists_url":"https://api.github.com/users/socobo/gists{/gist_id}","starred_url":"https://api.github.com/users/socobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socobo/subscriptions","organizations_url":"https://api.github.com/users/socobo/orgs","repos_url":"https://api.github.com/users/socobo/repos","events_url":"https://api.github.com/users/socobo/events{/privacy}","received_events_url":"https://api.github.com/users/socobo/received_events","type":"Organization","site_admin":false},"repo":{"id":75321893,"name":"SocoboPlusPlus","full_name":"socobo/SocoboPlusPlus","owner":{"login":"socobo","id":22557786,"avatar_url":"https://avatars0.githubusercontent.com/u/22557786?v=3","gravatar_id":"","url":"https://api.github.com/users/socobo","html_url":"https://github.com/socobo","followers_url":"https://api.github.com/users/socobo/followers","following_url":"https://api.github.com/users/socobo/following{/other_user}","gists_url":"https://api.github.com/users/socobo/gists{/gist_id}","starred_url":"https://api.github.com/users/socobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socobo/subscriptions","organizations_url":"https://api.github.com/users/socobo/orgs","repos_url":"https://api.github.com/users/socobo/repos","events_url":"https://api.github.com/users/socobo/events{/privacy}","received_events_url":"https://api.github.com/users/socobo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socobo/SocoboPlusPlus","description":"the final stack :-)","fork":false,"url":"https://api.github.com/repos/socobo/SocoboPlusPlus","forks_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/forks","keys_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/teams","hooks_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/hooks","issue_events_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/issues/events{/number}","events_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/events","assignees_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/assignees{/user}","branches_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/branches{/branch}","tags_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/tags","blobs_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/git/refs{/sha}","trees_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/statuses/{sha}","languages_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/languages","stargazers_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/stargazers","contributors_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/contributors","subscribers_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/subscribers","subscription_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/subscription","commits_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/commits{/sha}","git_commits_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/git/commits{/sha}","comments_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/comments{/number}","issue_comment_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/issues/comments{/number}","contents_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/contents/{+path}","compare_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/merges","archive_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/downloads","issues_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/issues{/number}","pulls_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls{/number}","milestones_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/milestones{/number}","notifications_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/labels{/name}","releases_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/releases{/id}","deployments_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/deployments","created_at":"2016-12-01T18:44:29Z","updated_at":"2017-04-15T17:23:10Z","pushed_at":"2017-06-17T21:14:51Z","git_url":"git://github.com/socobo/SocoboPlusPlus.git","ssh_url":"git@github.com:socobo/SocoboPlusPlus.git","clone_url":"https://github.com/socobo/SocoboPlusPlus.git","svn_url":"https://github.com/socobo/SocoboPlusPlus","homepage":null,"size":309,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":13,"forks":0,"open_issues":13,"watchers":2,"default_branch":"master"}},"base":{"label":"socobo:master","ref":"master","sha":"d6d3a3c2753d3f0db79aa2d6178a3625cb37ae2e","user":{"login":"socobo","id":22557786,"avatar_url":"https://avatars0.githubusercontent.com/u/22557786?v=3","gravatar_id":"","url":"https://api.github.com/users/socobo","html_url":"https://github.com/socobo","followers_url":"https://api.github.com/users/socobo/followers","following_url":"https://api.github.com/users/socobo/following{/other_user}","gists_url":"https://api.github.com/users/socobo/gists{/gist_id}","starred_url":"https://api.github.com/users/socobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socobo/subscriptions","organizations_url":"https://api.github.com/users/socobo/orgs","repos_url":"https://api.github.com/users/socobo/repos","events_url":"https://api.github.com/users/socobo/events{/privacy}","received_events_url":"https://api.github.com/users/socobo/received_events","type":"Organization","site_admin":false},"repo":{"id":75321893,"name":"SocoboPlusPlus","full_name":"socobo/SocoboPlusPlus","owner":{"login":"socobo","id":22557786,"avatar_url":"https://avatars0.githubusercontent.com/u/22557786?v=3","gravatar_id":"","url":"https://api.github.com/users/socobo","html_url":"https://github.com/socobo","followers_url":"https://api.github.com/users/socobo/followers","following_url":"https://api.github.com/users/socobo/following{/other_user}","gists_url":"https://api.github.com/users/socobo/gists{/gist_id}","starred_url":"https://api.github.com/users/socobo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/socobo/subscriptions","organizations_url":"https://api.github.com/users/socobo/orgs","repos_url":"https://api.github.com/users/socobo/repos","events_url":"https://api.github.com/users/socobo/events{/privacy}","received_events_url":"https://api.github.com/users/socobo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/socobo/SocoboPlusPlus","description":"the final stack :-)","fork":false,"url":"https://api.github.com/repos/socobo/SocoboPlusPlus","forks_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/forks","keys_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/teams","hooks_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/hooks","issue_events_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/issues/events{/number}","events_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/events","assignees_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/assignees{/user}","branches_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/branches{/branch}","tags_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/tags","blobs_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/git/refs{/sha}","trees_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/statuses/{sha}","languages_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/languages","stargazers_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/stargazers","contributors_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/contributors","subscribers_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/subscribers","subscription_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/subscription","commits_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/commits{/sha}","git_commits_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/git/commits{/sha}","comments_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/comments{/number}","issue_comment_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/issues/comments{/number}","contents_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/contents/{+path}","compare_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/merges","archive_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/downloads","issues_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/issues{/number}","pulls_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls{/number}","milestones_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/milestones{/number}","notifications_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/labels{/name}","releases_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/releases{/id}","deployments_url":"https://api.github.com/repos/socobo/SocoboPlusPlus/deployments","created_at":"2016-12-01T18:44:29Z","updated_at":"2017-04-15T17:23:10Z","pushed_at":"2017-06-17T21:14:51Z","git_url":"git://github.com/socobo/SocoboPlusPlus.git","ssh_url":"git@github.com:socobo/SocoboPlusPlus.git","clone_url":"https://github.com/socobo/SocoboPlusPlus.git","svn_url":"https://github.com/socobo/SocoboPlusPlus","homepage":null,"size":309,"stargazers_count":2,"watchers_count":2,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":13,"forks":0,"open_issues":13,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/74"},"html":{"href":"https://github.com/socobo/SocoboPlusPlus/pull/74"},"issue":{"href":"https://api.github.com/repos/socobo/SocoboPlusPlus/issues/74"},"comments":{"href":"https://api.github.com/repos/socobo/SocoboPlusPlus/issues/74/comments"},"review_comments":{"href":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/74/comments"},"review_comment":{"href":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/socobo/SocoboPlusPlus/pulls/74/commits"},"statuses":{"href":"https://api.github.com/repos/socobo/SocoboPlusPlus/statuses/788d36a1e4030e7694f4e132ced0f3da54b2e6da"}}}}
{"actor":{"display_login":"hetec"}}