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