{"action":"created","comment":{"url":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/comments/91491838","pull_request_review_id":11999734,"id":91491838,"diff_hunk":"@@ -22,21 +26,45 @@ router.post('/', (request, response, next) => {\n         fs.createReadStream(request.files.fileUpload.path)\n             .pipe(csv())\n             .on('data', function (data) {\n-                dataCsv.push(data); \n+                dataCsv.push(data);\n             })\n             .on('end', function (data) {\n-                dataAll=dataCsv; \n-                manager.insert(dataAll, request.params.sourceId, request.params.destinationId, request.params.date)\n-                    .then(doc => {\n-                        var result = resultFormatter.ok(apiVersion, 200, doc);\n-                        response.send(200, result);\n-                    })\n-                    .catch(e => {\n-                        var error = resultFormatter.fail(apiVersion, 400, e);\n-                        response.send(400, error);\n-                    })\n-            });\n+                dataAll = dataCsv;\n+                if (dataAll[0][0] === \"PackingList\" && dataAll[0][1] === \"Password\" && dataAll[0][2] === \"Barcode\" && dataAll[0][3] === \"Name\" && dataAll[0][4] === \"Size\" && dataAll[0][5] === \"Price\" && dataAll[0][6] === \"UOM\" && dataAll[0][7] === \"QTY\" || dataAll[0][8] === \"RO\") {\n+                    manager.insert(dataAll, request.params.sourceId, request.params.destinationId, request.params.date)\n+                        .then(doc => {\n+                           if (doc[0][\"Error\"] === undefined) {","path":"src/routers/v1/merchandiser/upload-csv-file-pbj-router.js","position":34,"original_position":34,"commit_id":"7ca1417abf902c64131cb259a70b438be86e6d3e","original_commit_id":"7ca1417abf902c64131cb259a70b438be86e6d3e","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"['Error'] is better written in dot notation.","created_at":"2016-12-08T11:03:52Z","updated_at":"2016-12-08T11:03:52Z","html_url":"https://github.com/danliris/bateeq-inventory-api/pull/25#discussion_r91491838","pull_request_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/25","_links":{"self":{"href":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/comments/91491838"},"html":{"href":"https://github.com/danliris/bateeq-inventory-api/pull/25#discussion_r91491838"},"pull_request":{"href":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/25"}}},"pull_request":{"url":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/25","id":97101107,"html_url":"https://github.com/danliris/bateeq-inventory-api/pull/25","diff_url":"https://github.com/danliris/bateeq-inventory-api/pull/25.diff","patch_url":"https://github.com/danliris/bateeq-inventory-api/pull/25.patch","issue_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/issues/25","number":25,"state":"open","locked":false,"title":"change router to upload pba and pbj","user":{"login":"JanuitaM","id":19768390,"avatar_url":"https://avatars.githubusercontent.com/u/19768390?v=3","gravatar_id":"","url":"https://api.github.com/users/JanuitaM","html_url":"https://github.com/JanuitaM","followers_url":"https://api.github.com/users/JanuitaM/followers","following_url":"https://api.github.com/users/JanuitaM/following{/other_user}","gists_url":"https://api.github.com/users/JanuitaM/gists{/gist_id}","starred_url":"https://api.github.com/users/JanuitaM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanuitaM/subscriptions","organizations_url":"https://api.github.com/users/JanuitaM/orgs","repos_url":"https://api.github.com/users/JanuitaM/repos","events_url":"https://api.github.com/users/JanuitaM/events{/privacy}","received_events_url":"https://api.github.com/users/JanuitaM/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-12-08T11:03:42Z","updated_at":"2016-12-08T11:03:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7a51b61da701d97c88040fdec1238711d3c0a242","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/25/commits","review_comments_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/25/comments","review_comment_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/issues/25/comments","statuses_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/statuses/7ca1417abf902c64131cb259a70b438be86e6d3e","head":{"label":"JanuitaM:dev","ref":"dev","sha":"7ca1417abf902c64131cb259a70b438be86e6d3e","user":{"login":"JanuitaM","id":19768390,"avatar_url":"https://avatars.githubusercontent.com/u/19768390?v=3","gravatar_id":"","url":"https://api.github.com/users/JanuitaM","html_url":"https://github.com/JanuitaM","followers_url":"https://api.github.com/users/JanuitaM/followers","following_url":"https://api.github.com/users/JanuitaM/following{/other_user}","gists_url":"https://api.github.com/users/JanuitaM/gists{/gist_id}","starred_url":"https://api.github.com/users/JanuitaM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanuitaM/subscriptions","organizations_url":"https://api.github.com/users/JanuitaM/orgs","repos_url":"https://api.github.com/users/JanuitaM/repos","events_url":"https://api.github.com/users/JanuitaM/events{/privacy}","received_events_url":"https://api.github.com/users/JanuitaM/received_events","type":"User","site_admin":false},"repo":{"id":73666849,"name":"bateeq-inventory-api","full_name":"JanuitaM/bateeq-inventory-api","owner":{"login":"JanuitaM","id":19768390,"avatar_url":"https://avatars.githubusercontent.com/u/19768390?v=3","gravatar_id":"","url":"https://api.github.com/users/JanuitaM","html_url":"https://github.com/JanuitaM","followers_url":"https://api.github.com/users/JanuitaM/followers","following_url":"https://api.github.com/users/JanuitaM/following{/other_user}","gists_url":"https://api.github.com/users/JanuitaM/gists{/gist_id}","starred_url":"https://api.github.com/users/JanuitaM/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JanuitaM/subscriptions","organizations_url":"https://api.github.com/users/JanuitaM/orgs","repos_url":"https://api.github.com/users/JanuitaM/repos","events_url":"https://api.github.com/users/JanuitaM/events{/privacy}","received_events_url":"https://api.github.com/users/JanuitaM/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/JanuitaM/bateeq-inventory-api","description":"RESTful api for bateeq inventory","fork":true,"url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api","forks_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/forks","keys_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/teams","hooks_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/hooks","issue_events_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/issues/events{/number}","events_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/events","assignees_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/assignees{/user}","branches_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/branches{/branch}","tags_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/tags","blobs_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/statuses/{sha}","languages_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/languages","stargazers_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/stargazers","contributors_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/contributors","subscribers_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/subscribers","subscription_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/subscription","commits_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/contents/{+path}","compare_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/merges","archive_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/downloads","issues_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/issues{/number}","pulls_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/pulls{/number}","milestones_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/milestones{/number}","notifications_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/labels{/name}","releases_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/releases{/id}","deployments_url":"https://api.github.com/repos/JanuitaM/bateeq-inventory-api/deployments","created_at":"2016-11-14T04:27:23Z","updated_at":"2016-11-14T04:27:25Z","pushed_at":"2016-12-08T11:03:09Z","git_url":"git://github.com/JanuitaM/bateeq-inventory-api.git","ssh_url":"git@github.com:JanuitaM/bateeq-inventory-api.git","clone_url":"https://github.com/JanuitaM/bateeq-inventory-api.git","svn_url":"https://github.com/JanuitaM/bateeq-inventory-api","homepage":null,"size":46,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"danliris:dev","ref":"dev","sha":"a5f9029ac503671e336129bca7e8111a8fdd72fb","user":{"login":"danliris","id":20855729,"avatar_url":"https://avatars.githubusercontent.com/u/20855729?v=3","gravatar_id":"","url":"https://api.github.com/users/danliris","html_url":"https://github.com/danliris","followers_url":"https://api.github.com/users/danliris/followers","following_url":"https://api.github.com/users/danliris/following{/other_user}","gists_url":"https://api.github.com/users/danliris/gists{/gist_id}","starred_url":"https://api.github.com/users/danliris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danliris/subscriptions","organizations_url":"https://api.github.com/users/danliris/orgs","repos_url":"https://api.github.com/users/danliris/repos","events_url":"https://api.github.com/users/danliris/events{/privacy}","received_events_url":"https://api.github.com/users/danliris/received_events","type":"User","site_admin":false},"repo":{"id":62210070,"name":"bateeq-inventory-api","full_name":"danliris/bateeq-inventory-api","owner":{"login":"danliris","id":20855729,"avatar_url":"https://avatars.githubusercontent.com/u/20855729?v=3","gravatar_id":"","url":"https://api.github.com/users/danliris","html_url":"https://github.com/danliris","followers_url":"https://api.github.com/users/danliris/followers","following_url":"https://api.github.com/users/danliris/following{/other_user}","gists_url":"https://api.github.com/users/danliris/gists{/gist_id}","starred_url":"https://api.github.com/users/danliris/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danliris/subscriptions","organizations_url":"https://api.github.com/users/danliris/orgs","repos_url":"https://api.github.com/users/danliris/repos","events_url":"https://api.github.com/users/danliris/events{/privacy}","received_events_url":"https://api.github.com/users/danliris/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/danliris/bateeq-inventory-api","description":"RESTful api for bateeq inventory","fork":false,"url":"https://api.github.com/repos/danliris/bateeq-inventory-api","forks_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/forks","keys_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/teams","hooks_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/hooks","issue_events_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/issues/events{/number}","events_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/events","assignees_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/assignees{/user}","branches_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/branches{/branch}","tags_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/tags","blobs_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/git/refs{/sha}","trees_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/statuses/{sha}","languages_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/languages","stargazers_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/stargazers","contributors_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/contributors","subscribers_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/subscribers","subscription_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/subscription","commits_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/commits{/sha}","git_commits_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/git/commits{/sha}","comments_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/comments{/number}","issue_comment_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/issues/comments{/number}","contents_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/contents/{+path}","compare_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/merges","archive_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/downloads","issues_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/issues{/number}","pulls_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls{/number}","milestones_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/milestones{/number}","notifications_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/labels{/name}","releases_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/releases{/id}","deployments_url":"https://api.github.com/repos/danliris/bateeq-inventory-api/deployments","created_at":"2016-06-29T08:39:52Z","updated_at":"2016-08-08T03:17:10Z","pushed_at":"2016-12-08T11:03:42Z","git_url":"git://github.com/danliris/bateeq-inventory-api.git","ssh_url":"git@github.com:danliris/bateeq-inventory-api.git","clone_url":"https://github.com/danliris/bateeq-inventory-api.git","svn_url":"https://github.com/danliris/bateeq-inventory-api","homepage":null,"size":54,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":1,"forks":5,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/25"},"html":{"href":"https://github.com/danliris/bateeq-inventory-api/pull/25"},"issue":{"href":"https://api.github.com/repos/danliris/bateeq-inventory-api/issues/25"},"comments":{"href":"https://api.github.com/repos/danliris/bateeq-inventory-api/issues/25/comments"},"review_comments":{"href":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/25/comments"},"review_comment":{"href":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danliris/bateeq-inventory-api/pulls/25/commits"},"statuses":{"href":"https://api.github.com/repos/danliris/bateeq-inventory-api/statuses/7ca1417abf902c64131cb259a70b438be86e6d3e"}}}}
{"actor":{"display_login":"houndci-bot"}}