Correzione struttura modelx abilitare null + update API POST
This commit is contained in:
@@ -1011,7 +1011,7 @@ namespace MP.IOC.Controllers
|
||||
/// <param name="id">ID dell'IOB</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("saveDataItems/{id}")]
|
||||
public async Task<IActionResult> SaveDataItems(string id, [FromBody] string content = "")
|
||||
public async Task<IActionResult> SaveDataItems(string id, [FromBody] List<MachDataItem> dataList)
|
||||
{
|
||||
if (string.IsNullOrEmpty(id)) return BadRequest("Missing ID");
|
||||
|
||||
@@ -1021,7 +1021,7 @@ namespace MP.IOC.Controllers
|
||||
string answ = "";
|
||||
try
|
||||
{
|
||||
bool done = await DService.SaveDataItemsAsync(id, content);
|
||||
bool done = await DService.SaveDataItemsAsync(id, dataList);
|
||||
answ = done ? "OK" : "KO";
|
||||
}
|
||||
catch (Exception exc)
|
||||
|
||||
Reference in New Issue
Block a user