FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Sync by TommyLemon · Pull Request #7 · APIJSON/APIJSON-CSharp · GitHub

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cs  (2) .csproj  (1) .js  (1) All 3 file types selected
Only manifest files
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
8 changes: 3 additions & 5 deletions APIJSON.NET/APIJSON.NET/APIJSON.NET.csproj
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,15 @@

<ItemGroup>
<PackageReference Include="AspectCore.Extensions.Reflection" Version="1.2.0" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.3" />
<PackageReference Include="Microsoft.AspNetCore.App" Version="2.2.4" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Cors" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Rewrite" Version="2.2.0" />
<PackageReference Include="Microsoft.AspNetCore.Server.Kestrel.Https" Version="2.2.0" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="2.2.3" />
<PackageReference Include="MySql.Data" Version="8.0.15" />
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.18.5" />
<PackageReference Include="SqlKata" Version="1.1.7" />
<PackageReference Include="SqlKata.Execution" Version="1.1.7" />
<PackageReference Include="sqlSugarCore" Version="4.9.9.2" />
<PackageReference Include="Oracle.ManagedDataAccess.Core" Version="2.18.6" />
<PackageReference Include="sqlSugarCore" Version="4.9.9.6" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Annotations" Version="4.0.1" />
<PackageReference Include="Swashbuckle.AspNetCore.Swagger" Version="4.0.1" />
Expand Down
21 changes: 7 additions & 14 deletions APIJSON.NET/APIJSON.NET/Controllers/JsonController.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,13 @@ public JsonController(SelectTable _selectTable, DbContext _db,IIdentityService i
/// <returns></returns>
[HttpPost("/get")]

public ActionResult Query([FromBody]string json)
public ActionResult Query([FromBody] JObject jobject)
{
json = HttpUtility.UrlDecode(json);
JObject ht = new JObject();
ht.Add("code", "200");
ht.Add("msg", "success");
try
{
JObject jobject = JObject.Parse(json);
int page = 0, count = 0, query = 0, total = 0;
foreach (var item in jobject)
{
Expand Down Expand Up @@ -178,16 +176,16 @@ public ActionResult Query([FromBody]string json)
/// <param name="json"></param>
/// <returns></returns>
[HttpPost("/add")]
public ActionResult Add([FromBody]string json)
public ActionResult Add([FromBody]JObject jobject)
{
json = HttpUtility.UrlDecode(json);

JObject ht = new JObject();
ht.Add("code", "200");
ht.Add("msg", "success");
try
{
JObject jobject = JObject.Parse(json);
var sb = new System.Text.StringBuilder(100);



foreach (var item in jobject)
{
Expand Down Expand Up @@ -222,16 +220,13 @@ public ActionResult Add([FromBody]string json)
/// <param name="json"></param>
/// <returns></returns>
[HttpPost("/edit")]
public ActionResult Edit([FromBody]string json)
public ActionResult Edit([FromBody]JObject jobject)
{
json = HttpUtility.UrlDecode(json);
JObject ht = new JObject();
ht.Add("code", "200");
ht.Add("msg", "success");
try
{
JObject jobject = JObject.Parse(json);

foreach (var item in jobject)
{
string key = item.Key.Trim();
Expand Down Expand Up @@ -276,16 +271,14 @@ public ActionResult Edit([FromBody]string json)
/// <param name="json"></param>
/// <returns></returns>
[HttpPost("/remove")]
public ActionResult Remove([FromBody]string json)
public ActionResult Remove([FromBody]JObject jobject)
{
json = HttpUtility.UrlDecode(json);
JObject ht = new JObject();
ht.Add("code", "200");
ht.Add("msg", "success");
try
{
var role = _identitySvc.GetRole();
JObject jobject = JObject.Parse(json);
foreach (var item in jobject)
{
string key = item.Key.Trim();
Expand Down
3 changes: 0 additions & 3 deletions APIJSON.NET/APIJSON.NET/Startup.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,7 @@
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.IdentityModel.Tokens;
using SqlKata.Execution;
using Swashbuckle.AspNetCore.Swagger;
using MySql.Data.MySqlClient;
using SqlKata.Compilers;

public class Startup
{
Expand Down
2 changes: 1 addition & 1 deletion APIJSON.NET/APIJSON.NET/wwwroot/js/main.js
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@
url: $('#rest-url').val(),
type: "POST", dataType: "json",
contentType: "application/json;charset=utf-8",
data: JSON.stringify($('#vInput').val()),
data: $('#vInput').val(),
success: function (data) {

App.jsonhtml = data;
Expand Down

Back | FazBrowse Home | New Git URL