{"action":"created","comment":{"url":"https://api.github.com/repos/mingzhi22/inspiration/pulls/comments/38270586","id":38270586,"diff_hunk":"@@ -0,0 +1,28 @@\n+var ComponentController = require('../controllers/ComponentController'),\n+    CategoryController = require('../controllers/CategoryController'),\n+    //http://yijiebuyi.com/blog/90c1381bfe0efb94cf9df932147552be.html\n+    //表单默认提交方式为www-form-urlencoded\n+    //有文件传输的为form-data类型，需要引入connect-multiparty库\n+    multipart = require('connect-multiparty'),\n+    multipartMiddleware = multipart();\n+\n+\n+exports.use = function (app) {\n+\n+\n+    //组件类的路由\n+    app.post('/component/create', multipartMiddleware, ComponentController.create);\n+    app.post('/component/edit', multipartMiddleware, ComponentController.edit);\n+    app.get('/component/category/:categoryID', ComponentController.getComponentByCategoryID);\n+    app.get('/file/:fileID', ComponentController.downFile);\n+\n+    //类别\n+    app.post('/category/create', CategoryController.createCategory);\n+    app.get('/category/:productLineID', CategoryController.getCategoriesByProductLineID);","path":"config/route.js","position":21,"original_position":21,"commit_id":"86734d262d3c4c6d104c66b5cddb8c1a10a5e4f6","original_commit_id":"86734d262d3c4c6d104c66b5cddb8c1a10a5e4f6","user":{"login":"mingzhi22","id":394217,"avatar_url":"https://avatars.githubusercontent.com/u/394217?v=3","gravatar_id":"","url":"https://api.github.com/users/mingzhi22","html_url":"https://github.com/mingzhi22","followers_url":"https://api.github.com/users/mingzhi22/followers","following_url":"https://api.github.com/users/mingzhi22/following{/other_user}","gists_url":"https://api.github.com/users/mingzhi22/gists{/gist_id}","starred_url":"https://api.github.com/users/mingzhi22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingzhi22/subscriptions","organizations_url":"https://api.github.com/users/mingzhi22/orgs","repos_url":"https://api.github.com/users/mingzhi22/repos","events_url":"https://api.github.com/users/mingzhi22/events{/privacy}","received_events_url":"https://api.github.com/users/mingzhi22/received_events","type":"User","site_admin":false},"body":"'/category/:productLineID' 应该考虑加个product，以表示是取产品线下的分组。如：/categories/product/:productLineID或/categories?pid=:productLineID","created_at":"2015-08-30T10:52:45Z","updated_at":"2015-08-30T10:52:45Z","html_url":"https://github.com/mingzhi22/inspiration/pull/6#discussion_r38270586","pull_request_url":"https://api.github.com/repos/mingzhi22/inspiration/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/mingzhi22/inspiration/pulls/comments/38270586"},"html":{"href":"https://github.com/mingzhi22/inspiration/pull/6#discussion_r38270586"},"pull_request":{"href":"https://api.github.com/repos/mingzhi22/inspiration/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/mingzhi22/inspiration/pulls/6","id":43711082,"html_url":"https://github.com/mingzhi22/inspiration/pull/6","diff_url":"https://github.com/mingzhi22/inspiration/pull/6.diff","patch_url":"https://github.com/mingzhi22/inspiration/pull/6.patch","issue_url":"https://api.github.com/repos/mingzhi22/inspiration/issues/6","number":6,"state":"open","locked":false,"title":"新增上传、下载文件业务","user":{"login":"hacke2","id":6399899,"avatar_url":"https://avatars.githubusercontent.com/u/6399899?v=3","gravatar_id":"","url":"https://api.github.com/users/hacke2","html_url":"https://github.com/hacke2","followers_url":"https://api.github.com/users/hacke2/followers","following_url":"https://api.github.com/users/hacke2/following{/other_user}","gists_url":"https://api.github.com/users/hacke2/gists{/gist_id}","starred_url":"https://api.github.com/users/hacke2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hacke2/subscriptions","organizations_url":"https://api.github.com/users/hacke2/orgs","repos_url":"https://api.github.com/users/hacke2/repos","events_url":"https://api.github.com/users/hacke2/events{/privacy}","received_events_url":"https://api.github.com/users/hacke2/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-08-30T10:26:06Z","updated_at":"2015-08-30T10:52:45Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6b0a2494c26c6f7c09f154b2b89167b97ecaa079","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mingzhi22/inspiration/pulls/6/commits","review_comments_url":"https://api.github.com/repos/mingzhi22/inspiration/pulls/6/comments","review_comment_url":"https://api.github.com/repos/mingzhi22/inspiration/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mingzhi22/inspiration/issues/6/comments","statuses_url":"https://api.github.com/repos/mingzhi22/inspiration/statuses/86734d262d3c4c6d104c66b5cddb8c1a10a5e4f6","head":{"label":"hacke2:dev","ref":"dev","sha":"86734d262d3c4c6d104c66b5cddb8c1a10a5e4f6","user":{"login":"hacke2","id":6399899,"avatar_url":"https://avatars.githubusercontent.com/u/6399899?v=3","gravatar_id":"","url":"https://api.github.com/users/hacke2","html_url":"https://github.com/hacke2","followers_url":"https://api.github.com/users/hacke2/followers","following_url":"https://api.github.com/users/hacke2/following{/other_user}","gists_url":"https://api.github.com/users/hacke2/gists{/gist_id}","starred_url":"https://api.github.com/users/hacke2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hacke2/subscriptions","organizations_url":"https://api.github.com/users/hacke2/orgs","repos_url":"https://api.github.com/users/hacke2/repos","events_url":"https://api.github.com/users/hacke2/events{/privacy}","received_events_url":"https://api.github.com/users/hacke2/received_events","type":"User","site_admin":false},"repo":{"id":41240821,"name":"inspiration","full_name":"hacke2/inspiration","owner":{"login":"hacke2","id":6399899,"avatar_url":"https://avatars.githubusercontent.com/u/6399899?v=3","gravatar_id":"","url":"https://api.github.com/users/hacke2","html_url":"https://github.com/hacke2","followers_url":"https://api.github.com/users/hacke2/followers","following_url":"https://api.github.com/users/hacke2/following{/other_user}","gists_url":"https://api.github.com/users/hacke2/gists{/gist_id}","starred_url":"https://api.github.com/users/hacke2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hacke2/subscriptions","organizations_url":"https://api.github.com/users/hacke2/orgs","repos_url":"https://api.github.com/users/hacke2/repos","events_url":"https://api.github.com/users/hacke2/events{/privacy}","received_events_url":"https://api.github.com/users/hacke2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hacke2/inspiration","description":"动效平台","fork":true,"url":"https://api.github.com/repos/hacke2/inspiration","forks_url":"https://api.github.com/repos/hacke2/inspiration/forks","keys_url":"https://api.github.com/repos/hacke2/inspiration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hacke2/inspiration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hacke2/inspiration/teams","hooks_url":"https://api.github.com/repos/hacke2/inspiration/hooks","issue_events_url":"https://api.github.com/repos/hacke2/inspiration/issues/events{/number}","events_url":"https://api.github.com/repos/hacke2/inspiration/events","assignees_url":"https://api.github.com/repos/hacke2/inspiration/assignees{/user}","branches_url":"https://api.github.com/repos/hacke2/inspiration/branches{/branch}","tags_url":"https://api.github.com/repos/hacke2/inspiration/tags","blobs_url":"https://api.github.com/repos/hacke2/inspiration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hacke2/inspiration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hacke2/inspiration/git/refs{/sha}","trees_url":"https://api.github.com/repos/hacke2/inspiration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hacke2/inspiration/statuses/{sha}","languages_url":"https://api.github.com/repos/hacke2/inspiration/languages","stargazers_url":"https://api.github.com/repos/hacke2/inspiration/stargazers","contributors_url":"https://api.github.com/repos/hacke2/inspiration/contributors","subscribers_url":"https://api.github.com/repos/hacke2/inspiration/subscribers","subscription_url":"https://api.github.com/repos/hacke2/inspiration/subscription","commits_url":"https://api.github.com/repos/hacke2/inspiration/commits{/sha}","git_commits_url":"https://api.github.com/repos/hacke2/inspiration/git/commits{/sha}","comments_url":"https://api.github.com/repos/hacke2/inspiration/comments{/number}","issue_comment_url":"https://api.github.com/repos/hacke2/inspiration/issues/comments{/number}","contents_url":"https://api.github.com/repos/hacke2/inspiration/contents/{+path}","compare_url":"https://api.github.com/repos/hacke2/inspiration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hacke2/inspiration/merges","archive_url":"https://api.github.com/repos/hacke2/inspiration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hacke2/inspiration/downloads","issues_url":"https://api.github.com/repos/hacke2/inspiration/issues{/number}","pulls_url":"https://api.github.com/repos/hacke2/inspiration/pulls{/number}","milestones_url":"https://api.github.com/repos/hacke2/inspiration/milestones{/number}","notifications_url":"https://api.github.com/repos/hacke2/inspiration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hacke2/inspiration/labels{/name}","releases_url":"https://api.github.com/repos/hacke2/inspiration/releases{/id}","created_at":"2015-08-23T07:49:00Z","updated_at":"2015-08-23T07:49:00Z","pushed_at":"2015-08-30T10:09:38Z","git_url":"git://github.com/hacke2/inspiration.git","ssh_url":"git@github.com:hacke2/inspiration.git","clone_url":"https://github.com/hacke2/inspiration.git","svn_url":"https://github.com/hacke2/inspiration","homepage":null,"size":127,"stargazers_count":0,"watchers_count":0,"language":"HTML","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":"mingzhi22:dev","ref":"dev","sha":"7ebd173adc8954ede4a4356fc10d82df225500e9","user":{"login":"mingzhi22","id":394217,"avatar_url":"https://avatars.githubusercontent.com/u/394217?v=3","gravatar_id":"","url":"https://api.github.com/users/mingzhi22","html_url":"https://github.com/mingzhi22","followers_url":"https://api.github.com/users/mingzhi22/followers","following_url":"https://api.github.com/users/mingzhi22/following{/other_user}","gists_url":"https://api.github.com/users/mingzhi22/gists{/gist_id}","starred_url":"https://api.github.com/users/mingzhi22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingzhi22/subscriptions","organizations_url":"https://api.github.com/users/mingzhi22/orgs","repos_url":"https://api.github.com/users/mingzhi22/repos","events_url":"https://api.github.com/users/mingzhi22/events{/privacy}","received_events_url":"https://api.github.com/users/mingzhi22/received_events","type":"User","site_admin":false},"repo":{"id":39615030,"name":"inspiration","full_name":"mingzhi22/inspiration","owner":{"login":"mingzhi22","id":394217,"avatar_url":"https://avatars.githubusercontent.com/u/394217?v=3","gravatar_id":"","url":"https://api.github.com/users/mingzhi22","html_url":"https://github.com/mingzhi22","followers_url":"https://api.github.com/users/mingzhi22/followers","following_url":"https://api.github.com/users/mingzhi22/following{/other_user}","gists_url":"https://api.github.com/users/mingzhi22/gists{/gist_id}","starred_url":"https://api.github.com/users/mingzhi22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mingzhi22/subscriptions","organizations_url":"https://api.github.com/users/mingzhi22/orgs","repos_url":"https://api.github.com/users/mingzhi22/repos","events_url":"https://api.github.com/users/mingzhi22/events{/privacy}","received_events_url":"https://api.github.com/users/mingzhi22/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mingzhi22/inspiration","description":"动效平台","fork":false,"url":"https://api.github.com/repos/mingzhi22/inspiration","forks_url":"https://api.github.com/repos/mingzhi22/inspiration/forks","keys_url":"https://api.github.com/repos/mingzhi22/inspiration/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mingzhi22/inspiration/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mingzhi22/inspiration/teams","hooks_url":"https://api.github.com/repos/mingzhi22/inspiration/hooks","issue_events_url":"https://api.github.com/repos/mingzhi22/inspiration/issues/events{/number}","events_url":"https://api.github.com/repos/mingzhi22/inspiration/events","assignees_url":"https://api.github.com/repos/mingzhi22/inspiration/assignees{/user}","branches_url":"https://api.github.com/repos/mingzhi22/inspiration/branches{/branch}","tags_url":"https://api.github.com/repos/mingzhi22/inspiration/tags","blobs_url":"https://api.github.com/repos/mingzhi22/inspiration/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mingzhi22/inspiration/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mingzhi22/inspiration/git/refs{/sha}","trees_url":"https://api.github.com/repos/mingzhi22/inspiration/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mingzhi22/inspiration/statuses/{sha}","languages_url":"https://api.github.com/repos/mingzhi22/inspiration/languages","stargazers_url":"https://api.github.com/repos/mingzhi22/inspiration/stargazers","contributors_url":"https://api.github.com/repos/mingzhi22/inspiration/contributors","subscribers_url":"https://api.github.com/repos/mingzhi22/inspiration/subscribers","subscription_url":"https://api.github.com/repos/mingzhi22/inspiration/subscription","commits_url":"https://api.github.com/repos/mingzhi22/inspiration/commits{/sha}","git_commits_url":"https://api.github.com/repos/mingzhi22/inspiration/git/commits{/sha}","comments_url":"https://api.github.com/repos/mingzhi22/inspiration/comments{/number}","issue_comment_url":"https://api.github.com/repos/mingzhi22/inspiration/issues/comments{/number}","contents_url":"https://api.github.com/repos/mingzhi22/inspiration/contents/{+path}","compare_url":"https://api.github.com/repos/mingzhi22/inspiration/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mingzhi22/inspiration/merges","archive_url":"https://api.github.com/repos/mingzhi22/inspiration/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mingzhi22/inspiration/downloads","issues_url":"https://api.github.com/repos/mingzhi22/inspiration/issues{/number}","pulls_url":"https://api.github.com/repos/mingzhi22/inspiration/pulls{/number}","milestones_url":"https://api.github.com/repos/mingzhi22/inspiration/milestones{/number}","notifications_url":"https://api.github.com/repos/mingzhi22/inspiration/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mingzhi22/inspiration/labels{/name}","releases_url":"https://api.github.com/repos/mingzhi22/inspiration/releases{/id}","created_at":"2015-07-24T06:12:59Z","updated_at":"2015-08-24T06:13:48Z","pushed_at":"2015-08-30T10:26:07Z","git_url":"git://github.com/mingzhi22/inspiration.git","ssh_url":"git@github.com:mingzhi22/inspiration.git","clone_url":"https://github.com/mingzhi22/inspiration.git","svn_url":"https://github.com/mingzhi22/inspiration","homepage":null,"size":364,"stargazers_count":1,"watchers_count":1,"language":"HTML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mingzhi22/inspiration/pulls/6"},"html":{"href":"https://github.com/mingzhi22/inspiration/pull/6"},"issue":{"href":"https://api.github.com/repos/mingzhi22/inspiration/issues/6"},"comments":{"href":"https://api.github.com/repos/mingzhi22/inspiration/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/mingzhi22/inspiration/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/mingzhi22/inspiration/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mingzhi22/inspiration/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/mingzhi22/inspiration/statuses/86734d262d3c4c6d104c66b5cddb8c1a10a5e4f6"}}}}