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

@@ -169,9 +169,10 @@ namespace AyaNova.Api.Controllers
///
/// </summary>
/// <param name="inObj">NameIdItem object containing source locale Id and new name</param>
/// <param name="apiVersion">Automatically filled from route path, no need to specify in body</param>
/// <returns>Error response or newly created locale</returns>
[HttpPost("Duplicate")]
public async Task<IActionResult> Duplicate([FromBody] NameIdItem inObj)
public async Task<IActionResult> Duplicate([FromBody] NameIdItem inObj, ApiVersion apiVersion)
{
if (serverState.IsClosed)
{
@@ -191,7 +192,7 @@ namespace AyaNova.Api.Controllers
}
else
{
return CreatedAtAction("GetLocale", new { id = o.Id }, new ApiCreatedResponse(o));
return CreatedAtAction(nameof(LocaleController.GetLocale), new { id = o.Id, version = apiVersion.ToString() }, new ApiCreatedResponse(o));
}
}