Added active program management
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Step.NC;
|
||||
using Step.Model.DTOModels;
|
||||
using Step.NC;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
@@ -45,5 +46,20 @@ namespace Step.Controllers.WebApi
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
}
|
||||
|
||||
[Route("file/active"), HttpPut]
|
||||
public IHttpActionResult SetActiveProgram([FromUri]string filePath)
|
||||
{
|
||||
using (NcHandler ncHandler = new NcHandler())
|
||||
{
|
||||
ncHandler.Connect();
|
||||
|
||||
CmsError cmsError = ncHandler.SetActiveProgramInfo(filePath, out DTOActiveProgramDataModel fileInfo);
|
||||
if (cmsError.IsError())
|
||||
return BadRequest(cmsError.localizationKey);
|
||||
|
||||
return Ok(fileInfo);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user