This commit is contained in:
@@ -96,14 +96,13 @@ namespace AyaNova.Api.Controllers
|
||||
/// <summary>
|
||||
/// Get paged list of widgets
|
||||
///
|
||||
/// Required roles: Any role
|
||||
///
|
||||
/// Required roles: Any
|
||||
///
|
||||
/// </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)
|
||||
{
|
||||
|
||||
if (serverState.IsClosed)
|
||||
{
|
||||
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
|
||||
@@ -150,11 +149,6 @@ namespace AyaNova.Api.Controllers
|
||||
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
|
||||
}
|
||||
|
||||
if (!Authorized.IsAuthorizedToRead(HttpContext.Items, AyaType.Widget))
|
||||
{
|
||||
return StatusCode(401, new ApiNotAuthorizedResponse());
|
||||
}
|
||||
|
||||
if (!ModelState.IsValid)
|
||||
{
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
@@ -500,5 +494,5 @@ namespace AyaNova.Api.Controllers
|
||||
//------------
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}//eoc
|
||||
}//eons
|
||||
Reference in New Issue
Block a user