This commit is contained in:
@@ -316,9 +316,10 @@ namespace AyaNova.Api.Controllers
|
||||
///
|
||||
/// </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> PostUser([FromBody] User inObj)
|
||||
public async Task<IActionResult> PostUser([FromBody] User inObj, ApiVersion apiVersion)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
{
|
||||
@@ -355,7 +356,7 @@ namespace AyaNova.Api.Controllers
|
||||
//return success and link
|
||||
//NOTE: this is a USER object so we don't want to return some key fields for security reasons
|
||||
//which is why the object is "cleaned" before return
|
||||
return CreatedAtAction("GetUser", new { id = o.Id }, new ApiCreatedResponse(UserBiz.CleanUserForReturn(o)));
|
||||
return CreatedAtAction(nameof(UserController.GetUser), new { id = o.Id, version = apiVersion.ToString() }, new ApiCreatedResponse(UserBiz.CleanUserForReturn(o)));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user