This commit is contained in:
@@ -58,7 +58,7 @@ namespace AyaNova.Api.Controllers
|
||||
/// <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, [FromQuery]long preId)
|
||||
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));
|
||||
@@ -81,7 +81,9 @@ namespace AyaNova.Api.Controllers
|
||||
//Instantiate the business object handler
|
||||
PickListBiz biz = PickListBiz.GetBiz(ct, HttpContext);
|
||||
|
||||
var o = await biz.GetPickListAsync(PickList, query, inactive, preId, log);
|
||||
if (preId == null)
|
||||
preId = 0;
|
||||
var o = await biz.GetPickListAsync(PickList, query, inactive, (long)preId, log);
|
||||
if (o == null)
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user