[FrontedWebApi][圖資管理] API 接口 FromBody補上

This commit is contained in:
dev01 2022-11-09 11:06:17 +08:00
parent 08953f8048
commit fe8594a19f
2 changed files with 5 additions and 5 deletions

View File

@ -13,8 +13,8 @@ using System.IO;
namespace FrontendWebApi.ApiControllers namespace FrontendWebApi.ApiControllers
{ {
[Route("api/[controller]")] //[Route("api/[controller]")]
[ApiController] //[ApiController]
public class GraphManageController : MyBaseApiController<GraphManageController> public class GraphManageController : MyBaseApiController<GraphManageController>
{ {
private readonly IBackendRepository backendRepository; private readonly IBackendRepository backendRepository;
@ -61,7 +61,7 @@ namespace FrontendWebApi.ApiControllers
} }
[HttpPost] [HttpPost]
public async Task<ApiResult<List<Variable>>> SubSysList(int main_system_tag) public async Task<ApiResult<List<Variable>>> SubSysList([FromBody] int main_system_tag)
{ {
ApiResult<List<Variable>> apiResult = new ApiResult<List<Variable>>(); ApiResult<List<Variable>> apiResult = new ApiResult<List<Variable>>();
List<Variable> sub_system_list = new List<Variable>(); List<Variable> sub_system_list = new List<Variable>();
@ -91,7 +91,7 @@ namespace FrontendWebApi.ApiControllers
} }
[HttpPost] [HttpPost]
public async Task<ApiResult<List<GraphList>>> GraManList(GraphInfo gi) public async Task<ApiResult<List<GraphList>>> GraManList([FromBody] GraphInfo gi)
{ {
ApiResult<List<GraphList>> apiResult = new ApiResult<List<GraphList>>(); ApiResult<List<GraphList>> apiResult = new ApiResult<List<GraphList>>();
List<GraphList> graManList = new List<GraphList>(); List<GraphList> graManList = new List<GraphList>();

View File

@ -37,7 +37,7 @@ namespace FrontendWebApi.Models
{ {
public string code { get; set; } public string code { get; set; }
public string main_system_tag { get; set; } public string main_system_tag { get; set; }
public List<int> sub_system_tag { get; set; } public List<int> sub_system_tag { get; set; } = new List<int>{ };
public string keyWord { get; set; } public string keyWord { get; set; }
} }
} }