Test Pinned via API ||

This commit is contained in:
2023-02-08 13:11:11 -07:00
parent 8e471e278e
commit 4514678556
17 changed files with 107 additions and 52 deletions

View File

@ -29,16 +29,17 @@ public class PinController : Controller, IPinController<IActionResult>
if (was is not null)
_Logger.LogDebug($"{toolTypeId} was: {was}");
HttpContext.Session.SetString(toolTypeId, json);
_PinRepository.SetPinnedTable(headerCommon);
return Ok();
}
[HttpGet]
[Route("{id}/pinned")]
public IActionResult GetPinnedTable(int id)
[Route("{id}/pinned/{rds}")]
public IActionResult GetPinnedTable(int id, string rds = "")
{
string? cde = HttpContext.Session.GetString(((int)IPinRepository.ToolId.CDE).ToString());
string? bioRad = HttpContext.Session.GetString(((int)IPinRepository.ToolId.BioRad).ToString());
return Json(_PinRepository.GetPinnedTable(_MetrologyRepository, id, bioRad, cde), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
return Json(_PinRepository.GetPinnedTable(_MetrologyRepository, id, rds, bioRad, cde), new JsonSerializerOptions { PropertyNamingPolicy = null, WriteIndented = true });
}
}