This commit is contained in:
2018-12-13 01:00:57 +00:00
parent 2906337517
commit b032847ef4
3 changed files with 12 additions and 116 deletions

View File

@@ -133,52 +133,16 @@ namespace AyaNova.Api.Controllers
// /// <summary>
// /// Get widget pick list
// ///
// /// Required roles: Any
// ///
// /// This list supports querying the Name property
// /// include a "q" parameter for string to search for
// /// use % for wildcards.
// ///
// /// e.g. q=%Jones%
// ///
// /// Query is case insensitive
// /// </summary>
// /// <returns>Paged id/name collection of widgets with paging data</returns>
// [HttpGet("PickList", Name = nameof(WidgetPickList))]
// public async Task<IActionResult> WidgetPickList([FromQuery] string q, [FromQuery] PagingOptions pagingOptions)
// {
// if (serverState.IsClosed)
// return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
// if (!ModelState.IsValid)
// return BadRequest(new ApiErrorResponse(ModelState));
// //Instantiate the business object handler
// WidgetBiz biz = WidgetBiz.GetBiz(ct, HttpContext);
// ApiPagedResponse<NameIdItem> pr = await biz.GetPickListAsync(Url, nameof(WidgetPickList), pagingOptions, q);
// return Ok(new ApiOkWithPagingResponse<NameIdItem>(pr));
// }
/// <summary>
/// Get widget pick list
/// <summary>
/// Get widget pick list
///
/// Required roles: Any
///
/// This list supports querying the Name property
/// include a "q" parameter for string to search for
/// use % for wildcards.
///
/// e.g. q=%Jones%
///
/// Query is case insensitive
/// </summary>
/// <returns>Paged id/name collection of widgets with paging data</returns>
/// <param name="pagingOptions">Paging, filtering and sorting options</param>
/// <returns>Paged id/name collection of widgets with paging data</returns>
[HttpGet("PickList", Name = nameof(WidgetPickList))]
public async Task<IActionResult> WidgetPickList([FromQuery] PagingOptions pagingOptions)
public ActionResult WidgetPickList([FromQuery] PagingOptions pagingOptions)
{
if (serverState.IsClosed)
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
@@ -189,10 +153,10 @@ namespace AyaNova.Api.Controllers
//Instantiate the business object handler
WidgetBiz biz = WidgetBiz.GetBiz(ct, HttpContext);
ApiPagedResponse<NameIdItem> pr = await biz.GetPickListAsync(Url, nameof(WidgetPickList), pagingOptions);
ApiPagedResponse<NameIdItem> pr = biz.GetPickList(Url, nameof(WidgetPickList), pagingOptions);
return Ok(new ApiOkWithPagingResponse<NameIdItem>(pr));
}
/// <summary>
/// Put (update) widget