This commit is contained in:
2020-01-24 15:44:20 +00:00
parent 9993835482
commit 0d01532e35
5 changed files with 12 additions and 20 deletions

View File

@@ -176,7 +176,7 @@ namespace AyaNova.Api.Controllers
/// <param name="apiVersion">Automatically filled from route path, no need to specify in body</param>
/// <returns></returns>
[HttpPost]
public async Task<IActionResult> PostWidget([FromBody] Widget inObj, ApiVersion apiVersion)
public IActionResult PostWidget([FromBody] Widget inObj, ApiVersion apiVersion)
{
if (!serverState.IsOpen)
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
@@ -192,7 +192,7 @@ namespace AyaNova.Api.Controllers
return BadRequest(new ApiErrorResponse(ModelState));
//Create and validate
Widget o = await biz.CreateAsync(inObj);
Widget o = biz.Create(inObj);
if (o == null)
return BadRequest(new ApiErrorResponse(biz.Errors));
else