Skip to content

Commit 3829250

Browse files
committed
1
1 parent f3ddc75 commit 3829250

File tree

3 files changed

+7
-10
lines changed

3 files changed

+7
-10
lines changed

APIJSON.NET/APIJSON.NET/Controllers/JsonController.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,14 @@ public async Task<ActionResult> QueryByTable([FromRoute]string table)
9999
/// <param name="json"></param>
100100
/// <returns></returns>
101101
[HttpPost("/add")]
102-
public ActionResult Add([FromBody]JObject jobject)
102+
public async Task<ActionResult> Add([FromBody]JObject jobject)
103103
{
104104

105105
JObject ht = new JObject();
106106
ht.Add("code", "200");
107107
ht.Add("msg", "success");
108108
try
109109
{
110-
111-
112-
113110
foreach (var item in jobject)
114111
{
115112
string key = item.Key.Trim();

APIJSON.NET/APIJSON.NET/Controllers/TokenController.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public TokenController(DbContext _db, IOptions<TokenAuthConfiguration> configura
3030
}
3131
[HttpPost("/token")]
3232
[AllowAnonymous]
33-
public ActionResult Create([FromBody]TokenInput input)
33+
public async Task< ActionResult> Create([FromBody]TokenInput input)
3434
{
3535
JObject ht = new JObject();
3636
ht.Add("code", "200");

APIJSON.NET/APIJSON.NET/appsettings.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"ConnectionStrings": {
33
"DbType": 0, //0:MySql,1:SqlServer,2:Sqlite
4-
"ConnectionString": "Server=192.168.2.25;Database=yunwei;Uid=root;Pwd=xmjk;Port=3306;Character Set=utf8;"
4+
"ConnectionString": "Server=;Database=wordpress;Uid=roota;Pwd=@Abc;Port=3306;Character Set=utf8;"
55
//"ConnectionString": "Server=119.29.9.25;Port=3306;Database=test;Uid=root;Pwd=1q,2w.3e?;CharSet=UTF8;"
66
},
77
"Authentication": {
@@ -16,20 +16,20 @@
1616
{
1717
"name": "role1", //权限名称 唯一
1818
"select": { //查询权限
19-
"table": [ "moment", "User", "Comment" ], //可操作的表
19+
"table": [ "guopindata" ], //可操作的表
2020
"column": [ "*", "*", "*" ], //可操作的字段
2121
"where": []
2222
},
2323
"update": { //修改权限
24-
"table": [ "moment", "User", "Comment" ],
24+
"table": [ "guopindata" ],
2525
"column": [ "*", "*", "*" ]
2626
},
2727
"insert": { //添加权限
28-
"table": [ "moment", "User", "Comment" ],
28+
"table": [ "guopindata"],
2929
"column": [ "*", "*", "*" ]
3030
},
3131
"delete": { //删除权限
32-
"table": [ "moment", "User", "Comment" ]
32+
"table": [ "guopindata" ]
3333
}
3434
},
3535
{

0 commit comments

Comments
 (0)