This commit is contained in:
@@ -78,12 +78,38 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Get filter options
|
||||||
|
///
|
||||||
|
/// Required roles:
|
||||||
|
/// BizAdminFull, InventoryFull, BizAdminLimited, InventoryLimited, TechFull, TechLimited, Accounting
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Filter options</returns>
|
||||||
|
[HttpGet("FilterOptions")]
|
||||||
|
public ActionResult FilterOptions()
|
||||||
|
{
|
||||||
|
if (serverState.IsClosed)
|
||||||
|
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
|
||||||
|
|
||||||
|
//Instantiate the business object handler
|
||||||
|
WidgetBiz biz = WidgetBiz.GetBiz(ct, HttpContext);
|
||||||
|
|
||||||
|
if (!Authorized.IsAuthorizedToReadFullRecord(HttpContext.Items, biz.BizType))
|
||||||
|
return StatusCode(401, new ApiNotAuthorizedResponse());
|
||||||
|
|
||||||
|
return Ok(new
|
||||||
|
{
|
||||||
|
data = biz.FilterOptions
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Get paged list of widgets
|
/// Get paged list of widgets
|
||||||
///
|
///
|
||||||
/// Required roles: Any
|
/// Required roles:
|
||||||
///
|
/// BizAdminFull, InventoryFull, BizAdminLimited, InventoryLimited, TechFull, TechLimited, Accounting
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Paged collection of widgets with paging data</returns>
|
/// <returns>Paged collection of widgets with paging data</returns>
|
||||||
[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
|
[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
|
||||||
|
|||||||
Reference in New Issue
Block a user