-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathroutes.js
More file actions
51 lines (51 loc) · 889 Bytes
/
routes.js
File metadata and controls
51 lines (51 loc) · 889 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// prefix:URL 前缀
// pin: 需要映射的模式集
// map:要用作 URL Endpoint 的 pin 通配符属性列表
module.exports = [
{
prefix: "/api",
postfix: "/?param=true",
pin: "role:math,cmd:*",
map: {
sum: {
GET: true,
POST: true,
alias: "/sum"
},
product: {
GET: true,
POST: true,
alias: "/product"
}
}
},
{
prefix: "/api",
postfix: "/?param=true",
pin: "role:email,cmd:*",
map: {
send: {
GET: true,
POST: true,
alias: "/email/send"
}
}
},
{
prefix: "/api",
postfix: "/?param=true",
pin: "role:token,cmd:*",
map: {
send: {
GET: true,
POST: true,
alias: "/token"
},
verify: {
GET: true,
POST: true,
alias: "/verify"
}
}
}
];