This commit is contained in:
@@ -241,23 +241,24 @@ namespace AyaNova.Api.Controllers
|
|||||||
[HttpGet("default/{dataListKey}")]
|
[HttpGet("default/{dataListKey}")]
|
||||||
public ActionResult GetDefaultDataListView([FromRoute] string dataListKey)
|
public ActionResult GetDefaultDataListView([FromRoute] string dataListKey)
|
||||||
{
|
{
|
||||||
if (!serverState.IsOpen)
|
throw new System.NotSupportedException("NEEDS REPLACEMENT WITH NEW SYSTEM");
|
||||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
// if (!serverState.IsOpen)
|
||||||
|
// return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||||
|
|
||||||
//Instantiate the business object handler
|
// //Instantiate the business object handler
|
||||||
DataListViewBiz biz = DataListViewBiz.GetBiz(ct, HttpContext);
|
// DataListViewBiz biz = DataListViewBiz.GetBiz(ct, HttpContext);
|
||||||
|
|
||||||
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
// if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
||||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
// return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||||
|
|
||||||
if (!ModelState.IsValid)
|
// if (!ModelState.IsValid)
|
||||||
return BadRequest(new ApiErrorResponse(ModelState));
|
// return BadRequest(new ApiErrorResponse(ModelState));
|
||||||
|
|
||||||
var o = AyaNova.DataList.DataListFactory.GetAyaDataList(dataListKey); ;
|
// var o = AyaNova.DataList.DataListFactory.GetAyaDataList(dataListKey); ;
|
||||||
if (o == null)
|
// if (o == null)
|
||||||
return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
// return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||||
|
|
||||||
return Ok(ApiOkResponse.Response(o.DefaultListView));
|
// return Ok(ApiOkResponse.Response(o.DefaultListView));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user