From cc2be4bdd3ca2865e3e3a7131f83e3a4016b61ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E6=94=BE?= Date: Fri, 14 Jul 2017 18:08:05 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=A2=9E=E5=8A=A0=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AF=86=E7=A0=81=E5=92=8C=E8=8E=B7=E5=8F=96=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=88=90=E5=91=98=E5=88=97=E8=A1=A8=E8=BF=94=E5=9B=9E=E7=A4=BA?= =?UTF-8?q?=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- exampleCode/api/project/get_member_list.json | 16 ++++++++++++++++ exampleCode/api/user/change_password.json | 9 +++++++++ server/controllers/project.js | 6 +++--- server/router.js | 2 +- server_dist/controllers/project.js | 6 +++--- server_dist/router.js | 2 +- 6 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 exampleCode/api/project/get_member_list.json create mode 100644 exampleCode/api/user/change_password.json diff --git a/exampleCode/api/project/get_member_list.json b/exampleCode/api/project/get_member_list.json new file mode 100644 index 00000000..553b0f3e --- /dev/null +++ b/exampleCode/api/project/get_member_list.json @@ -0,0 +1,16 @@ +{ + "errcode": 0, + "errmsg": "success", + "data": [ + { + "_id": 101, + "email": "admin@admin.com", + "password": "e00084747ecba89837affe8a048e83c751e44209", + "passsalt": "fmf3kytyysc4swwuqc15rk9", + "role": "admin", + "add_time": 1499932673, + "up_time": 1499932673, + "__v": 0 + } + ] +} diff --git a/exampleCode/api/user/change_password.json b/exampleCode/api/user/change_password.json new file mode 100644 index 00000000..88a09442 --- /dev/null +++ b/exampleCode/api/user/change_password.json @@ -0,0 +1,9 @@ +{ + "errcode": 0, + "errmsg": "success", + "data": { + "n": 1, + "nModified": 1, + "ok": 1 + } +} diff --git a/server/controllers/project.js b/server/controllers/project.js index dc76197a..3a20a7c6 100644 --- a/server/controllers/project.js +++ b/server/controllers/project.js @@ -76,7 +76,7 @@ class projectController extends baseController { } /** - * 添加项目 + * 添加项目成员 * @interface /project/add_member * @method POST * @category project @@ -108,7 +108,7 @@ class projectController extends baseController { } /** - * 添加项目 + * 删除项目成员 * @interface /project/del_member * @method POST * @category project @@ -142,7 +142,7 @@ class projectController extends baseController { /** * 获取项目成员列表 - * @interface /project/get_member_list + * @interface /project/get_member_list.json * @method GET * @category project * @foldnumber 10 diff --git a/server/router.js b/server/router.js index 12977a7c..bd4f95cc 100644 --- a/server/router.js +++ b/server/router.js @@ -56,7 +56,7 @@ createAction('project', 'up', 'post', 'up') createAction('project', 'del', 'post', 'del') createAction('project', 'add_member', 'post', 'addMember') createAction('project', 'del_member', 'post', 'delMember') -createAction('project', 'get_member_list', 'get', 'getMemberList') +createAction('project', 'get_member_list.json', 'get', 'getMemberList') createAction('project', 'search', 'get', 'search') //interface diff --git a/server_dist/controllers/project.js b/server_dist/controllers/project.js index a70a28c3..f1956733 100644 --- a/server_dist/controllers/project.js +++ b/server_dist/controllers/project.js @@ -201,7 +201,7 @@ var projectController = function (_baseController) { return add; }() /** - * 添加项目 + * 添加项目成员 * @interface /project/add_member * @method POST * @category project @@ -285,7 +285,7 @@ var projectController = function (_baseController) { return addMember; }() /** - * 添加项目 + * 删除项目成员 * @interface /project/del_member * @method POST * @category project @@ -371,7 +371,7 @@ var projectController = function (_baseController) { /** * 获取项目成员列表 - * @interface /project/get_member_list + * @interface /project/get_member_list.json * @method GET * @category project * @foldnumber 10 diff --git a/server_dist/router.js b/server_dist/router.js index b34b3021..7ef1e1ba 100644 --- a/server_dist/router.js +++ b/server_dist/router.js @@ -82,7 +82,7 @@ createAction('project', 'up', 'post', 'up'); createAction('project', 'del', 'post', 'del'); createAction('project', 'add_member', 'post', 'addMember'); createAction('project', 'del_member', 'post', 'delMember'); -createAction('project', 'get_member_list', 'get', 'getMemberList'); +createAction('project', 'get_member_list.json', 'get', 'getMemberList'); createAction('project', 'search', 'get', 'search'); //interface