{"action":"created","comment":{"url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/comments/158768030","pull_request_review_id":85621703,"id":158768030,"diff_hunk":"@@ -0,0 +1,167 @@\n+var Router = require('restify-router').Router;\n+var db = require(\"../../../../db\");\n+//var DailyOperationManager = require(\"dl-module\").managers.production.finishingPrinting.DailyOperationManager;\n+var DailyOperationManager = require(\"dl-module\").managers.production.finishingPrinting.PackingManager;\n+var resultFormatter = require(\"../../../../result-formatter\");\n+\n+var passport = require('../../../../passports/jwt-passport');\n+const apiVersion = '1.0.0';\n+\n+function getRouter() {\n+\n+    var defaultOrder = {\n+        \"_updatedDate\": -1\n+    };\n+\n+    var getManager = (user) => {\n+        return db.get()\n+            .then((db) => {\n+                return Promise.resolve(new DailyOperationManager(db, user));\n+            });\n+    };\n+\n+    var router = new Router();\n+\n+    router.get(\"/\", passport, function (request, response, next) {\n+        var user = request.user;\n+        var query = request.query;\n+        query.order = Object.assign({}, defaultOrder, query.order);\n+\n+        var dailyOperationManager = {};\n+        getManager(user)\n+            .then((manager) => {\n+                dailyOperationManager = manager;\n+                return dailyOperationManager.getQcgudangReport(query);\n+            })\n+            .then(docs => {\n+                var result = resultFormatter.ok(apiVersion, 200, docs);\n+                return Promise.resolve(result);\n+            })\n+            .then((result) => {\n+                if ((request.headers.accept || '').toString().indexOf(\"application/xls\") < 0) {\n+                    response.send(result.statusCode, result);    \n+                }\n+                else{\n+                            dailyOperationManager.getXlss(result, query)\n+                            .then(xls => {\n+                            response.xls(xls.name, xls.data, xls.options)\n+                        });\n+                      \n+                     }\n+                \n+            })\n+            .catch((e) => {","path":"src/routers/v1/finishing-printing/reports/qcgudang-report-router.js","position":53,"original_position":53,"commit_id":"45e72d9047966f05e0201c205aec1cbc87c153c6","original_commit_id":"45e72d9047966f05e0201c205aec1cbc87c153c6","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","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":"'arrow function syntax (=>)' is only available in ES6 (use 'esversion: 6').","created_at":"2017-12-27T06:30:39Z","updated_at":"2017-12-27T06:30:40Z","html_url":"https://github.com/danliris/dl-production-finishing-printing-webapi/pull/167#discussion_r158768030","pull_request_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/167","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/comments/158768030"},"html":{"href":"https://github.com/danliris/dl-production-finishing-printing-webapi/pull/167#discussion_r158768030"},"pull_request":{"href":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/167"}}},"pull_request":{"url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/167","id":160200337,"html_url":"https://github.com/danliris/dl-production-finishing-printing-webapi/pull/167","diff_url":"https://github.com/danliris/dl-production-finishing-printing-webapi/pull/167.diff","patch_url":"https://github.com/danliris/dl-production-finishing-printing-webapi/pull/167.patch","issue_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/issues/167","number":167,"state":"open","locked":false,"title":"Merge dev ke uat 27 Des 2017","user":{"login":"danliris","id":20855729,"avatar_url":"https://avatars0.githubusercontent.com/u/20855729?v=4","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},"body":"","created_at":"2017-12-27T06:30:30Z","updated_at":"2017-12-27T06:30:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"91822a5b3555271f9e13e606d80ac03333426970","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/167/commits","review_comments_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/167/comments","review_comment_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/comments{/number}","comments_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/issues/167/comments","statuses_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/statuses/45e72d9047966f05e0201c205aec1cbc87c153c6","head":{"label":"danliris:dev","ref":"dev","sha":"45e72d9047966f05e0201c205aec1cbc87c153c6","user":{"login":"danliris","id":20855729,"avatar_url":"https://avatars0.githubusercontent.com/u/20855729?v=4","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":74094794,"name":"dl-production-finishing-printing-webapi","full_name":"danliris/dl-production-finishing-printing-webapi","owner":{"login":"danliris","id":20855729,"avatar_url":"https://avatars0.githubusercontent.com/u/20855729?v=4","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/dl-production-finishing-printing-webapi","description":"Dan Liris production RESTful api","fork":false,"url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi","forks_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/forks","keys_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/teams","hooks_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/hooks","issue_events_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/issues/events{/number}","events_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/events","assignees_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/assignees{/user}","branches_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/branches{/branch}","tags_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/tags","blobs_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/statuses/{sha}","languages_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/languages","stargazers_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/stargazers","contributors_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/contributors","subscribers_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/subscribers","subscription_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/subscription","commits_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/contents/{+path}","compare_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/merges","archive_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/downloads","issues_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/issues{/number}","pulls_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls{/number}","milestones_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/milestones{/number}","notifications_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/labels{/name}","releases_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/releases{/id}","deployments_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/deployments","created_at":"2016-11-18T04:19:28Z","updated_at":"2017-09-20T05:05:59Z","pushed_at":"2017-12-27T06:30:30Z","git_url":"git://github.com/danliris/dl-production-finishing-printing-webapi.git","ssh_url":"git@github.com:danliris/dl-production-finishing-printing-webapi.git","clone_url":"https://github.com/danliris/dl-production-finishing-printing-webapi.git","svn_url":"https://github.com/danliris/dl-production-finishing-printing-webapi","homepage":null,"size":461,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":19,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"danliris:uat","ref":"uat","sha":"30c10de2c64f331b748609e0cbef5ff39c443b0f","user":{"login":"danliris","id":20855729,"avatar_url":"https://avatars0.githubusercontent.com/u/20855729?v=4","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":74094794,"name":"dl-production-finishing-printing-webapi","full_name":"danliris/dl-production-finishing-printing-webapi","owner":{"login":"danliris","id":20855729,"avatar_url":"https://avatars0.githubusercontent.com/u/20855729?v=4","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/dl-production-finishing-printing-webapi","description":"Dan Liris production RESTful api","fork":false,"url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi","forks_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/forks","keys_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/keys{/key_id}","collaborators_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/teams","hooks_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/hooks","issue_events_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/issues/events{/number}","events_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/events","assignees_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/assignees{/user}","branches_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/branches{/branch}","tags_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/tags","blobs_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/git/refs{/sha}","trees_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/git/trees{/sha}","statuses_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/statuses/{sha}","languages_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/languages","stargazers_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/stargazers","contributors_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/contributors","subscribers_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/subscribers","subscription_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/subscription","commits_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/commits{/sha}","git_commits_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/git/commits{/sha}","comments_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/comments{/number}","issue_comment_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/issues/comments{/number}","contents_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/contents/{+path}","compare_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/compare/{base}...{head}","merges_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/merges","archive_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/downloads","issues_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/issues{/number}","pulls_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls{/number}","milestones_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/milestones{/number}","notifications_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/labels{/name}","releases_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/releases{/id}","deployments_url":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/deployments","created_at":"2016-11-18T04:19:28Z","updated_at":"2017-09-20T05:05:59Z","pushed_at":"2017-12-27T06:30:30Z","git_url":"git://github.com/danliris/dl-production-finishing-printing-webapi.git","ssh_url":"git@github.com:danliris/dl-production-finishing-printing-webapi.git","clone_url":"https://github.com/danliris/dl-production-finishing-printing-webapi.git","svn_url":"https://github.com/danliris/dl-production-finishing-printing-webapi","homepage":null,"size":461,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":19,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":19,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/167"},"html":{"href":"https://github.com/danliris/dl-production-finishing-printing-webapi/pull/167"},"issue":{"href":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/issues/167"},"comments":{"href":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/issues/167/comments"},"review_comments":{"href":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/167/comments"},"review_comment":{"href":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/pulls/167/commits"},"statuses":{"href":"https://api.github.com/repos/danliris/dl-production-finishing-printing-webapi/statuses/45e72d9047966f05e0201c205aec1cbc87c153c6"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}