This commit is contained in:
@@ -100,8 +100,8 @@ namespace AyaNova.Api.Controllers
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns>Paged collection of widgets with paging data</returns>
|
||||
[HttpGet("List", Name = nameof(List))]//We MUST have a "Name" defined or we can't get the link for the pagination, non paged urls don't need a name
|
||||
public async Task<IActionResult> List([FromQuery] PagingOptions pagingOptions)
|
||||
[HttpGet("ListWidgets", Name = nameof(ListWidgets))]//We MUST have a "Name" defined or we can't get the link for the pagination, non paged urls don't need a name
|
||||
public async Task<IActionResult> ListWidgets([FromQuery] PagingOptions pagingOptions)
|
||||
{
|
||||
if (serverState.IsClosed)
|
||||
{
|
||||
@@ -121,7 +121,7 @@ namespace AyaNova.Api.Controllers
|
||||
//Instantiate the business object handler
|
||||
WidgetBiz biz = new WidgetBiz(ct, UserIdFromContext.Id(HttpContext.Items), UserRolesFromContext.Roles(HttpContext.Items));
|
||||
|
||||
ApiPagedResponse<Widget> pr = await biz.GetManyAsync(Url, nameof(List), pagingOptions);
|
||||
ApiPagedResponse<Widget> pr = await biz.GetManyAsync(Url, nameof(ListWidgets), pagingOptions);
|
||||
return Ok(new ApiOkWithPagingResponse<Widget>(pr));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user