This commit is contained in:
2021-02-03 20:12:36 +00:00
parent 267b498e93
commit fd540f29ed
3 changed files with 23 additions and 23 deletions

View File

@@ -103,7 +103,7 @@ namespace AyaNova.Api.Controllers
/// <param name="inObj"></param>
/// <returns></returns>
[HttpPut("{id}")]
public async Task<IActionResult> PutDataListSavedFilter([FromRoute] long id, [FromBody] DataListSavedFilter inObj)
public async Task<IActionResult> PutDataListSavedFilter([FromBody] DataListSavedFilter inObj)
{
if (!serverState.IsOpen)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
@@ -114,7 +114,7 @@ namespace AyaNova.Api.Controllers
//Instantiate the business object handler
DataListSavedFilterBiz biz = DataListSavedFilterBiz.GetBiz(ct, HttpContext);
var o = await biz.GetAsync(id, false);
var o = await biz.GetAsync(inObj.Id, false);
if (o == null)
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
@@ -128,7 +128,7 @@ namespace AyaNova.Api.Controllers
}
catch (DbUpdateConcurrencyException)
{
if (!await biz.ExistsAsync(id))
if (!await biz.ExistsAsync(inObj.Id))
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
else
return StatusCode(409, new ApiErrorResponse(ApiErrorCode.CONCURRENCY_CONFLICT));