rename all variants of naming that hold an AyaType value to "aType" (parameter) / "AType" (not parameter) everywhere front and back; "ayType", "objectType", "oType" all are used in various areas
This commit is contained in:
@@ -160,10 +160,10 @@ namespace AyaNova.Api.Controllers
|
||||
/// <summary>
|
||||
/// Get Report list for object
|
||||
/// </summary>
|
||||
/// <param name="ayType">Type of object</param>
|
||||
/// <param name="aType">Type of object</param>
|
||||
/// <returns>Name / id report list of allowed reports for role of requester</returns>
|
||||
[HttpGet("list/{ayType}")]
|
||||
public async Task<IActionResult> GetReportList([FromRoute] AyaType ayType)
|
||||
[HttpGet("list/{aType}")]
|
||||
public async Task<IActionResult> GetReportList([FromRoute] AyaType aType)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
@@ -171,11 +171,11 @@ namespace AyaNova.Api.Controllers
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
//extra check if they have rights to the type of object in question, this nips it in the bud before they even get to the fetch data stage later
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, ayType))
|
||||
if (!Authorized.HasReadFullRole(HttpContext.Items, aType))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
var o = await biz.GetReportListAsync(ayType);
|
||||
var o = await biz.GetReportListAsync(aType);
|
||||
if (o == null) return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
|
||||
return Ok(ApiOkResponse.Response(o));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user