This commit is contained in:
qitmac000249 2017-08-10 12:14:40 +08:00
commit c204913521
2 changed files with 43 additions and 34 deletions

View File

@ -52,168 +52,173 @@ const INTERFACE_CONFIG = {
const routerConfig = {
"group": [
{
{
"action": "list",
"path": "list",
"method": "get"
},
{
{
"action": "add",
"path": "add",
"method": "post"
},
{
{
"action": "up",
"path": "up",
"method": "post"
},
{
{
"action": "del",
"path": "del",
"method": "post"
},
{
{
"action": "addMember",
"path": "add_member",
"method": "post"
},
{
{
"action": "delMember",
"path": "del_member",
"method": "post"
},
{
{
"action": "getMemberList",
"path": "members",
"method": "get"
}
],
"user": [
{
{
"action": "login",
"path": "login",
"method": "post"
},
{
{
"action": "reg",
"path": "reg",
"method": "post"
},
{
{
"action": "list",
"path": "list",
"method": "get"
},
{
{
"action": "findById",
"path": "find",
"method": "get"
},
{
{
"action": "update",
"path": "update",
"method": "post"
},
{
{
"action": "del",
"path": "del",
"method": "post"
},
{
{
"action": "getLoginStatus",
"path": "status",
"method": "get"
},
{
{
"action": "logout",
"path": "logout",
"method": "get"
},
{
{
"action": "loginByToken",
"path": "login_by_token",
"method": "post"
},
{
{
"action": "changePassword",
"path": "change_password",
"method": "post"
},
{
{
"action": "search",
"path": "search",
"method": "get"
},
{
{
"action": "nav",
"path": "nav",
"method": "get"
}
],
"project": [
{
{
"action": "add",
"path": "add",
"method": "post"
},
{
{
"action": "list",
"path": "list",
"method": "get"
},
{
{
"action": "get",
"path": "get",
"method": "get"
},
{
{
"action": "up",
"path": "up",
"method": "post"
},
{
{
"action": "del",
"path": "del",
"method": "post"
},
{
{
"action": "addMember",
"path": "add_member",
"method": "post"
},
{
{
"action": "delMember",
"path": "del_member",
"method": "post"
},
{
{
"action": "getMemberList",
"path": "get_member_list",
"method": "get"
},
{
{
"action": "search",
"path": "search",
"method": "get"
},
{
"action": "download",
"path": "download",
"method": "get"
}
],
"interface": [
{
{
"action": "add",
"path": "add",
"method": "post"
},
{
{
"action": "list",
"path": "list",
"method": "get"
},
{
{
"action": "get",
"path": "get",
"method": "get"
},
{
{
"action": "up",
"path": "up",
"method": "post"
@ -289,7 +294,7 @@ for(let ctrl in routerConfig){
actions.forEach( (item) => {
createAction(ctrl, item.action, item.path, item.method);
} )
}
}
/**
*
@ -312,4 +317,4 @@ function createAction(controller, action, path, method) {
});
}
module.exports = router;
module.exports = router;

View File

@ -202,6 +202,10 @@ var routerConfig = {
"action": "search",
"path": "search",
"method": "get"
}, {
"action": "download",
"path": "download",
"method": "get"
}],
"interface": [{
"action": "add",