This commit is contained in:
2019-10-21 22:40:16 +00:00
parent 0ae191daca
commit de6ab566f0
7 changed files with 81 additions and 22 deletions

View File

@@ -227,9 +227,10 @@ namespace AyaNova.Api.Controllers
/// Required roles: BizAdminFull
/// </summary>
/// <param name="inObj"></param>
/// <param name="apiVersion">Automatically filled from route path, no need to specify in body</param>
/// <returns></returns>
[HttpPost]
public async Task<IActionResult> PostFormCustom([FromBody] FormCustom inObj)
public async Task<IActionResult> PostFormCustom([FromBody] FormCustom inObj, ApiVersion apiVersion)
{
if (!serverState.IsOpen)
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
@@ -249,7 +250,7 @@ namespace AyaNova.Api.Controllers
if (o == null)
return BadRequest(new ApiErrorResponse(biz.Errors));
else
return CreatedAtAction("GetFormCustom", new { formkey = o.FormKey }, new ApiCreatedResponse(o));
return CreatedAtAction(nameof(FormCustomController.GetFormCustom), new { formkey = o.FormKey, version = apiVersion.ToString() }, new ApiCreatedResponse(o));
}