This commit is contained in:
2021-01-13 15:51:40 +00:00
parent 8e90f78a28
commit 369b8f3af8
4 changed files with 14 additions and 12 deletions

View File

@@ -55,11 +55,11 @@ namespace AyaNova.Api.Controllers
/// Independantely of this, if an addition space separated string that begins with two consecutive periods is encountered that will be considered a separate match to the TAGS collection of each object
/// So a tag query might be entered as "..zon some" which would match all tags LIKE 'zon' and template fields LIKE 'some'</param>
/// <param name="inactive">Include inactive objects in the returned list </param>
/// <param name="preId">Return only one item (for pre-selected items on forms) </param>
/// <param name="preIds">Return only specific items (for pre-selected items on forms) </param>
/// <param name="variant">Some lists optionally take a variant string, e.g. User type "inside","outside" etc </param>
/// <returns>Filtered list</returns>
[HttpGet("list")]
public async Task<IActionResult> GetList([FromQuery] AyaType ayaType, [FromQuery] string query, [FromQuery] bool inactive, [FromQuery] long? preId, [FromQuery] string variant)
public async Task<IActionResult> GetList([FromQuery] AyaType ayaType, [FromQuery] string query, [FromQuery] bool inactive, [FromQuery] long[] preIds, [FromQuery] string variant)
{
if (serverState.IsClosed)
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
@@ -82,9 +82,8 @@ namespace AyaNova.Api.Controllers
//Instantiate the business object handler
PickListBiz biz = PickListBiz.GetBiz(ct, HttpContext);
if (preId == null)
preId = 0;
var o = await biz.GetPickListAsync(PickList, query, inactive, (long)preId, variant, log);
var o = await biz.GetPickListAsync(PickList, query, inactive, preIds, variant, log);
if (o == null)
return BadRequest(new ApiErrorResponse(biz.Errors));
else