This commit is contained in:
2020-03-23 19:58:27 +00:00
parent a40aa0cc90
commit cb08a727fa
4 changed files with 8 additions and 6 deletions

View File

@@ -55,9 +55,10 @@ 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>
/// <returns>Filtered list</returns>
[HttpGet("List")]
public async Task<IActionResult> GetList([FromQuery]AyaType ayaType, [FromQuery]string query, [FromQuery] bool inactive)
public async Task<IActionResult> GetList([FromQuery]AyaType ayaType, [FromQuery]string query, [FromQuery] bool inactive, [FromQuery]long preId)
{
if (!serverState.IsOpen)
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
@@ -80,7 +81,7 @@ namespace AyaNova.Api.Controllers
//Instantiate the business object handler
PickListBiz biz = PickListBiz.GetBiz(ct, HttpContext);
var o = await biz.GetPickListAsync(PickList, query, inactive, log);
var o = await biz.GetPickListAsync(PickList, query, inactive, preId, log);
if (o == null)
return BadRequest(new ApiErrorResponse(biz.Errors));
else