Fix name field & added offset update

This commit is contained in:
Lucio Maranta
2018-08-20 15:42:11 +02:00
parent 37669e5a63
commit ad22ce02e0
3 changed files with 91 additions and 71 deletions
@@ -571,5 +571,20 @@ namespace Step.Controllers.WebApi
return Ok();
}
}
[Route("offset/{offsetId:int}"), HttpPut]
public IHttpActionResult UpdateOffset(short offsetId, OffsetModel offsetData)
{
using (NcHandler ncHandler = new NcHandler())
{
ncHandler.Connect();
CmsError cmsError = ncHandler.UpdateOffset(offsetId, offsetData);
if (cmsError.IsError())
return BadRequest(cmsError.localizationKey);
return Ok();
}
}
}
}