[FrontedWebApi] User API parameter 部分加入FromBody

This commit is contained in:
dev01 2022-11-05 09:16:51 +08:00
parent 2c829f7fd4
commit 960c1b0777

View File

@ -245,7 +245,7 @@ namespace FrontendWebApi.ApiControllers
/// <param name="guid"></param> /// <param name="guid"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<ApiResult<SimpleUser>> GetOneUser(string guid) public async Task<ApiResult<SimpleUser>> GetOneUser([FromBody] string guid)
{ {
ApiResult<SimpleUser> apiResult = new ApiResult<SimpleUser>(); ApiResult<SimpleUser> apiResult = new ApiResult<SimpleUser>();
@ -282,7 +282,7 @@ namespace FrontendWebApi.ApiControllers
/// <param name="id"></param> /// <param name="id"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<ApiResult<string>> DeleteOneUser(string guid) public async Task<ApiResult<string>> DeleteOneUser([FromBody] string guid)
{ {
ApiResult<string> apiResult = new ApiResult<string>(); ApiResult<string> apiResult = new ApiResult<string>();
@ -321,7 +321,7 @@ namespace FrontendWebApi.ApiControllers
/// <param name="post"></param> /// <param name="post"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<ApiResult<string>> SaveRole(PostRole post) public async Task<ApiResult<string>> SaveRole([FromBody] PostRole post)
{ {
ApiResult<string> apiResult = new ApiResult<string>(); ApiResult<string> apiResult = new ApiResult<string>();
@ -394,7 +394,7 @@ namespace FrontendWebApi.ApiControllers
/// <param name="id"></param> /// <param name="id"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<ApiResult<SimpleRole>> GetOneRole(string guid) public async Task<ApiResult<SimpleRole>> GetOneRole([FromBody] string guid)
{ {
ApiResult<SimpleRole> apiResult = new ApiResult<SimpleRole>(); ApiResult<SimpleRole> apiResult = new ApiResult<SimpleRole>();
@ -430,7 +430,7 @@ namespace FrontendWebApi.ApiControllers
/// <param name="id"></param> /// <param name="id"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<ApiResult<string>> DeleteOneRole(string guid) public async Task<ApiResult<string>> DeleteOneRole([FromBody] string guid)
{ {
ApiResult<string> apiResult = new ApiResult<string>(); ApiResult<string> apiResult = new ApiResult<string>();
@ -479,7 +479,7 @@ namespace FrontendWebApi.ApiControllers
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<ApiResult<List<RoleAuthList>>> RoleAuthList(PostRoleAuthFilter post) public async Task<ApiResult<List<RoleAuthList>>> RoleAuthList([FromBody] PostRoleAuthFilter post)
{ {
ApiResult<List<RoleAuthList>> apiResult = new ApiResult<List<RoleAuthList>>(); ApiResult<List<RoleAuthList>> apiResult = new ApiResult<List<RoleAuthList>>();
List<RoleAuthList> roleAuthList = new List<RoleAuthList>(); List<RoleAuthList> roleAuthList = new List<RoleAuthList>();
@ -617,7 +617,7 @@ namespace FrontendWebApi.ApiControllers
/// <param name="post"></param> /// <param name="post"></param>
/// <returns></returns> /// <returns></returns>
[HttpPost] [HttpPost]
public async Task<ApiResult<string>> DeleteOneRoleAuth(PostDeleteRoleAuth post) public async Task<ApiResult<string>> DeleteOneRoleAuth([FromBody] PostDeleteRoleAuth post)
{ {
ApiResult<string> apiResult = new ApiResult<string>(); ApiResult<string> apiResult = new ApiResult<string>();