{"action":"created","issue":{"url":"https://api.github.com/repos/Jumio/con-rest/issues/70","labels_url":"https://api.github.com/repos/Jumio/con-rest/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/Jumio/con-rest/issues/70/comments","events_url":"https://api.github.com/repos/Jumio/con-rest/issues/70/events","html_url":"https://github.com/Jumio/con-rest/pull/70","id":55905037,"number":70,"title":"Connector execution","user":{"login":"dominikkukacka","id":243319,"avatar_url":"https://avatars.githubusercontent.com/u/243319?v=3","gravatar_id":"","url":"https://api.github.com/users/dominikkukacka","html_url":"https://github.com/dominikkukacka","followers_url":"https://api.github.com/users/dominikkukacka/followers","following_url":"https://api.github.com/users/dominikkukacka/following{/other_user}","gists_url":"https://api.github.com/users/dominikkukacka/gists{/gist_id}","starred_url":"https://api.github.com/users/dominikkukacka/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dominikkukacka/subscriptions","organizations_url":"https://api.github.com/users/dominikkukacka/orgs","repos_url":"https://api.github.com/users/dominikkukacka/repos","events_url":"https://api.github.com/users/dominikkukacka/events{/privacy}","received_events_url":"https://api.github.com/users/dominikkukacka/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Jumio/con-rest/labels/ready%20for%20test","name":"ready for test","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-29T14:25:45Z","updated_at":"2015-02-04T14:07:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Jumio/con-rest/pulls/70","html_url":"https://github.com/Jumio/con-rest/pull/70","diff_url":"https://github.com/Jumio/con-rest/pull/70.diff","patch_url":"https://github.com/Jumio/con-rest/pull/70.patch"},"body":"<a href='#crh-start'></a><a href='#crh-data-%7B%22processed%22%3A%20%5B%22https%3A//github.com/Jumio/con-rest/pull/70%23issuecomment-72205118%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23827829%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23827890%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828068%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828272%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828395%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828473%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828490%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828533%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23830311%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23830363%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23830383%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23830454%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23830483%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23830493%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23830866%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23843578%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23843579%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23843580%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23843581%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23843582%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23843583%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23843584%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23843585%22%2C%20%22https%3A//github.com/Jumio/con-rest/pull/70%23issuecomment-72477163%22%5D%2C%20%22comments%22%3A%20%7B%22General%20Comment%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/Jumio/con-rest/pull/70%23issuecomment-72205118%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22code%20review%20%3A%2B1%3A%20%22%2C%20%22created_at%22%3A%20%222015-01-30T14%3A03%3A04Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%2C%20%7B%22body%22%3A%20%22Found%20a%20bug%20on%20mapper%20creation.%20This%20blocks%20testing%20the%20connectors.%20%5Cr%5Cn%60%60%60%5Cr%5CnScenario%3A%20Create%20mapper%5Cr%5Cn%20%20Given%20Mapper%20name%20is%20%5C%22test%5C%22%5Cr%5Cn%20%20%20%20And%20place%20is%20%5C%22data%5C%22%5Cr%5Cn%20%20%20%20And%20source%20is%20%5C%22authToken%5C%22%5Cr%5Cn%20%20%20%20And%20source%20is%20%5C%22authToken%5C%22%5Cr%5Cn%20%20When%20pressing%20the%20save%20button%5Cr%5Cn%20%20Then%20a%20mapper%20should%20be%20present%20with%20one%20map%5Cr%5Cn%20%20%5Cr%5Cn%20%20Error%3A%20Mapper%20with%20one%20map%20corresponding%20provided%20data%20is%20present%5Cr%5Cn%20%20%20%20%20along%20with%20a%20map%20with%20empty%20values%5Cr%5Cn%60%60%60%22%2C%20%22created_at%22%3A%20%222015-02-02T15%3A36%3A30Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22General%20Comment%22%7D%2C%20%22Pull%2007de42be97e81a10a34e681fc944db8d01ed31db%20server/connector.js%2041%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828272%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Why%20is%20the%20%60header%60%20mapped%20differently%20then%20the%20%60data%60%3F%20Aren%27t%20they%20both%20a%20%60json%60%3F%22%2C%20%22created_at%22%3A%20%222015-01-30T07%3A56%3A41Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%2C%20%7B%22body%22%3A%20%22Yes%20they%20are.%20However%20the%20%60header%60cannot%20contain%20nested%20objects%20only%20key/value%20pairs%20%28value%20has%20to%20be%20a%20string%29.%5Cr%5Cn%60data%60%20on%20the%20other%20side%20can%20be%20nested%20objects%2C%20arrays%20whatever%20you%20like%20it%20to%20be.%5Cr%5Cn%5Cr%5Cndoes%20it%20make%20sense%20to%20use%20the%20same%20function%20for%20it%3F%22%2C%20%22created_at%22%3A%20%222015-01-30T09%3A00%3A48Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/243319%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dominikkukacka%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-01-30T14%3A03%3A21Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20server/connector.js%3AL107-175%22%7D%2C%20%22Pull%2007de42be97e81a10a34e681fc944db8d01ed31db%20server/workflow.js%2042%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828490%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Then%20we%20could%20remove%20this%20wrapper%20function%20%3A%29%22%2C%20%22created_at%22%3A%20%222015-01-30T08%3A03%3A37Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%2C%20%7B%22body%22%3A%20%22yes%2C%20i%20will%20do%20that.%22%2C%20%22created_at%22%3A%20%222015-01-30T09%3A01%3A31Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/243319%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dominikkukacka%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-01-30T14%3A03%3A21Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20server/workflow.js%3AL86-102%22%7D%2C%20%22Pull%2007de42be97e81a10a34e681fc944db8d01ed31db%20test/unit/server/workflowSpecs.js%2013%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828533%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22would%20you%20be%20so%20kind%20and%20move%20the%20%60.%60%20to%20the%20next%20line%3F%22%2C%20%22created_at%22%3A%20%222015-01-30T08%3A04%3A59Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%2C%20%7B%22body%22%3A%20%22ah%20yes%20%3A%29%22%2C%20%22created_at%22%3A%20%222015-01-30T09%3A01%3A45Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/243319%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dominikkukacka%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-01-30T14%3A03%3A21Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20test/unit/server/workflowSpecs.js%3AL224-405%22%7D%2C%20%22Pull%2007de42be97e81a10a34e681fc944db8d01ed31db%20server/connector.js%2022%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23827890%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22basically%20%60callTo%60%20is%20the%20call%20input%20right%3F%20I%20think%20it%20would%20be%20easier%20to%20understand%20if%20we%20rename%20this%20to%20%60callInput%60%22%2C%20%22created_at%22%3A%20%222015-01-30T07%3A44%3A13Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%2C%20%7B%22body%22%3A%20%22callTo%20is%20the%20next%20call%20which%20will%20be%20executed%20so%20probably%20%60nextCall%60%20would%20be%20more%20appropriate%22%2C%20%22created_at%22%3A%20%222015-01-30T08%3A58%3A39Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/243319%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dominikkukacka%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-01-30T14%3A03%3A22Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20server/connector.js%3AL107-175%22%7D%2C%20%22Pull%2007de42be97e81a10a34e681fc944db8d01ed31db%20server/connector.js%2030%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828068%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22I%20don%27t%20understand%20why%202%20of%203%20cases%20are%20handled%20in%20the%20connector%2C%20while%20they%20are%20actually%20mapping%20values.%20From%20my%20point%20of%20view%20this%20should%20be%20the%20responsibility%20of%20the%20mapper.%20In%20fact%2C%20imo%20the%20modifyCall%20should%20be%20a%20function%20completely%20in%20responsibility%20of%20the%20mapper.%20%22%2C%20%22created_at%22%3A%20%222015-01-30T07%3A49%3A59Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%2C%20%7B%22body%22%3A%20%22Actually%20you%20are%20right%2C%20i%20will%20move%20it%20to%20the%20mapper%20since%20it%20makes%20much%20more%20sense.%22%2C%20%22created_at%22%3A%20%222015-01-30T08%3A59%3A10Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/243319%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dominikkukacka%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-01-30T14%3A03%3A22Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20server/connector.js%3AL107-175%22%7D%2C%20%22Pull%2007de42be97e81a10a34e681fc944db8d01ed31db%20server/connector.js%2015%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23827829%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22I%20recently%20started%20adding%20%60%21%21callForm%60%20to%20my%20checks%20if%20something%20gives%20a%20%60true%60%20value.%20I%20think%20it%20adds%20a%20little%20bit%20more%20readability.%20What%20do%20you%20think%3F%20%28they%20do%20the%20same%20btw%29%22%2C%20%22created_at%22%3A%20%222015-01-30T07%3A42%3A20Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%2C%20%7B%22body%22%3A%20%22i%20think%20the%20%21%21%20makes%20it%20much%20more%20clearer%21%20i%20like%20it%20%3A%29%22%2C%20%22created_at%22%3A%20%222015-01-30T08%3A57%3A51Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/243319%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dominikkukacka%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-01-30T14%3A03%3A22Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20server/connector.js%3AL107-175%22%7D%2C%20%22Pull%2007de42be97e81a10a34e681fc944db8d01ed31db%20server/workflow.js%2023%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828473%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22why%20not%3A%5Cr%5Cn%60.then%28api.executeAPICall%29%60%5Cr%5Cn%5Cr%5CnThis%20will%20result%20in%20the%20same%20without%20the%20need%20of%20an%20wrapper%20function.%22%2C%20%22created_at%22%3A%20%222015-01-30T08%3A03%3A04Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-none%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-01-30T14%3A03%3A23Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20server/workflow.js%3AL70-78%22%7D%2C%20%22Pull%2007de42be97e81a10a34e681fc944db8d01ed31db%20server/workflow.js%205%22%3A%20%7B%22html_url%22%3A%20%22https%3A//github.com/Jumio/con-rest/pull/70%23discussion_r23828395%22%2C%20%22comments%22%3A%20%5B%7B%22body%22%3A%20%22Since%20the%20%60connector%60%20already%20imports%20the%20%60Connector%20resource%60%2C%20we%20can%20now%20remove%20the%20Connector%20import.%5Cr%5CnThe%20same%20would%20apply%20for%20%60APIcall%60%20and%20if%20I%27m%20not%20mistaken%20also%20the%20%60Execution%60.%22%2C%20%22created_at%22%3A%20%222015-01-30T08%3A01%3A01Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%2C%20%7B%22body%22%3A%20%22with%20the%20%60Connector%60%20you%20are%20right.%5Cr%5Cnbut%20i%20use%20the%20%60Execution%60%20and%20the%20%60APICall%60%20directly%20so%20i%20need%20the%20import%20%28or%20a%20call%20to%20%60mongoose.model%60%20but%20i%20think%20this%20ways%20it%27s%20clearer%29%22%2C%20%22created_at%22%3A%20%222015-01-30T09%3A12%3A10Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/243319%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/dominikkukacka%22%7D%7D%2C%20%7B%22body%22%3A%20%22%3A%2B1%3A%3Ca%20href%3D%27%23crh-update-complete%27%3E%3C/a%3E%22%2C%20%22created_at%22%3A%20%222015-01-30T14%3A03%3A23Z%22%2C%20%22user%22%3A%20%7B%22avatar_url%22%3A%20%22https%3A//avatars.githubusercontent.com/u/1508400%3Fv%3D3%22%2C%20%22html_url%22%3A%20%22https%3A//github.com/EnoF%22%7D%7D%5D%2C%20%22title%22%3A%20%22File%3A%20server/workflow.js%3AL3-10%22%7D%7D%7D'></a>\n<a href='https://www.codereviewhub.com/'><img src='http://www.codereviewhub.com/site/github-bar.png' height=40></a>\n- [ ] <a href='#crh-comment-General Comment'></a> <img src='http://www.codereviewhub.com/site/github-remaining.png' height=16 width=60>&nbsp;<b><a href='https://github.com/Jumio/con-rest/pull/70#issuecomment-72205118'>General Comment</a></b>\n- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> code review :+1:\n- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> Found a bug on mapper creation. This blocks testing the connectors.\n```\nScenario: Create mapper\nGiven Mapper name is \"test\"\nAnd place is \"data\"\nAnd source is \"authToken\"\nAnd source is \"authToken\"\nWhen pressing the save button\nThen a mapper should be present with one map\nError: Mapper with one map corresponding provided data is present\nalong with a map with empty values\n```\n- [x] <a href='#crh-comment-Pull 07de42be97e81a10a34e681fc944db8d01ed31db server/connector.js 15'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/Jumio/con-rest/pull/70#discussion_r23827829'>File: server/connector.js:L107-175</a></b>\n- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> I recently started adding `!!callForm` to my checks if something gives a `true` value. I think it adds a little bit more readability. What do you think? (they do the same btw)\n- <a href='https://github.com/dominikkukacka'><img border=0 src='https://avatars.githubusercontent.com/u/243319?v=3' height=16 width=16'></a> i think the !! makes it much more clearer! i like it :)\n- [x] <a href='#crh-comment-Pull 07de42be97e81a10a34e681fc944db8d01ed31db server/connector.js 22'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/Jumio/con-rest/pull/70#discussion_r23827890'>File: server/connector.js:L107-175</a></b>\n- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> basically `callTo` is the call input right? I think it would be easier to understand if we rename this to `callInput`\n- <a href='https://github.com/dominikkukacka'><img border=0 src='https://avatars.githubusercontent.com/u/243319?v=3' height=16 width=16'></a> callTo is the next call which will be executed so probably `nextCall` would be more appropriate\n- [x] <a href='#crh-comment-Pull 07de42be97e81a10a34e681fc944db8d01ed31db server/connector.js 30'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/Jumio/con-rest/pull/70#discussion_r23828068'>File: server/connector.js:L107-175</a></b>\n- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> I don't understand why 2 of 3 cases are handled in the connector, while they are actually mapping values. From my point of view this should be the responsibility of the mapper. In fact, imo the modifyCall should be a function completely in responsibility of the mapper.\n- <a href='https://github.com/dominikkukacka'><img border=0 src='https://avatars.githubusercontent.com/u/243319?v=3' height=16 width=16'></a> Actually you are right, i will move it to the mapper since it makes much more sense.\n- [x] <a href='#crh-comment-Pull 07de42be97e81a10a34e681fc944db8d01ed31db server/connector.js 41'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/Jumio/con-rest/pull/70#discussion_r23828272'>File: server/connector.js:L107-175</a></b>\n- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> Why is the `header` mapped differently then the `data`? Aren't they both a `json`?\n- <a href='https://github.com/dominikkukacka'><img border=0 src='https://avatars.githubusercontent.com/u/243319?v=3' height=16 width=16'></a> Yes they are. However the `header`cannot contain nested objects only key/value pairs (value has to be a string).\n`data` on the other side can be nested objects, arrays whatever you like it to be.\ndoes it make sense to use the same function for it?\n- [x] <a href='#crh-comment-Pull 07de42be97e81a10a34e681fc944db8d01ed31db server/workflow.js 5'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/Jumio/con-rest/pull/70#discussion_r23828395'>File: server/workflow.js:L3-10</a></b>\n- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> Since the `connector` already imports the `Connector resource`, we can now remove the Connector import.\nThe same would apply for `APIcall` and if I'm not mistaken also the `Execution`.\n- <a href='https://github.com/dominikkukacka'><img border=0 src='https://avatars.githubusercontent.com/u/243319?v=3' height=16 width=16'></a> with the `Connector` you are right.\nbut i use the `Execution` and the `APICall` directly so i need the import (or a call to `mongoose.model` but i think this ways it's clearer)\n- [x] <a href='#crh-comment-Pull 07de42be97e81a10a34e681fc944db8d01ed31db server/workflow.js 23'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/Jumio/con-rest/pull/70#discussion_r23828473'>File: server/workflow.js:L70-78</a></b>\n- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> why not:\n`.then(api.executeAPICall)`\nThis will result in the same without the need of an wrapper function.\n- [x] <a href='#crh-comment-Pull 07de42be97e81a10a34e681fc944db8d01ed31db server/workflow.js 42'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/Jumio/con-rest/pull/70#discussion_r23828490'>File: server/workflow.js:L86-102</a></b>\n- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> Then we could remove this wrapper function :)\n- <a href='https://github.com/dominikkukacka'><img border=0 src='https://avatars.githubusercontent.com/u/243319?v=3' height=16 width=16'></a> yes, i will do that.\n- [x] <a href='#crh-comment-Pull 07de42be97e81a10a34e681fc944db8d01ed31db test/unit/server/workflowSpecs.js 13'></a> <img src='http://www.codereviewhub.com/site/github-completed.png' height=16 width=60>&nbsp;<b><a href='https://github.com/Jumio/con-rest/pull/70#discussion_r23828533'>File: test/unit/server/workflowSpecs.js:L224-405</a></b>\n- <a href='https://github.com/EnoF'><img border=0 src='https://avatars.githubusercontent.com/u/1508400?v=3' height=16 width=16'></a> would you be so kind and move the `.` to the next line?\n- <a href='https://github.com/dominikkukacka'><img border=0 src='https://avatars.githubusercontent.com/u/243319?v=3' height=16 width=16'></a> ah yes :)\n\n\n<a href='https://www.codereviewhub.com/Jumio/con-rest/pull/70?mark_as_completed=1'><img src='http://www.codereviewhub.com/site/github-mark-as-completed.png' height=26></a>&nbsp;<a href='https://www.codereviewhub.com/Jumio/con-rest/pull/70?approve=1'><img src='http://www.codereviewhub.com/site/github-approve.png' height=26></a>&nbsp;<a href='https://github.com/Jumio/con-rest/pull/70'><img src='http://www.codereviewhub.com/site/github-refresh.png' height=26></a>\n<a href='#crh-end'></a>"},"comment":{"url":"https://api.github.com/repos/Jumio/con-rest/issues/comments/72859297","html_url":"https://github.com/Jumio/con-rest/pull/70#issuecomment-72859297","issue_url":"https://api.github.com/repos/Jumio/con-rest/issues/70","id":72859297,"user":{"login":"TheBay0r","id":8627051,"avatar_url":"https://avatars.githubusercontent.com/u/8627051?v=3","gravatar_id":"","url":"https://api.github.com/users/TheBay0r","html_url":"https://github.com/TheBay0r","followers_url":"https://api.github.com/users/TheBay0r/followers","following_url":"https://api.github.com/users/TheBay0r/following{/other_user}","gists_url":"https://api.github.com/users/TheBay0r/gists{/gist_id}","starred_url":"https://api.github.com/users/TheBay0r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/TheBay0r/subscriptions","organizations_url":"https://api.github.com/users/TheBay0r/orgs","repos_url":"https://api.github.com/users/TheBay0r/repos","events_url":"https://api.github.com/users/TheBay0r/events{/privacy}","received_events_url":"https://api.github.com/users/TheBay0r/received_events","type":"User","site_admin":false},"created_at":"2015-02-04T14:07:15Z","updated_at":"2015-02-04T14:07:15Z","body":"Added Bug #71 \r\nThis one should be fixed before merge"}}