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:
@@ -40,22 +40,22 @@ namespace AyaNova.Api.Controllers
|
||||
/// not all business objects have names some may return '-' or simply the type name
|
||||
/// if that is the case
|
||||
/// </summary>
|
||||
/// <param name="ayType">AyaType</param>
|
||||
/// <param name="aType">AyaType</param>
|
||||
/// <param name="id">Non zero id, if zero returns type name</param>
|
||||
/// <returns>Name</returns>
|
||||
[HttpGet("{ayType}/{id}")]
|
||||
public ActionResult GetName([FromRoute] AyaType ayType, [FromRoute] long id)
|
||||
[HttpGet("{aType}/{id}")]
|
||||
public ActionResult GetName([FromRoute] AyaType aType, [FromRoute] long id)
|
||||
{
|
||||
if (!serverState.IsOpen)
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
if (!Authorized.HasSelectRole(HttpContext.Items, ayType))
|
||||
if (!Authorized.HasSelectRole(HttpContext.Items, aType))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
if (!ModelState.IsValid)
|
||||
return BadRequest(new ApiErrorResponse(ModelState));
|
||||
if (id == 0)
|
||||
return Ok(ApiOkResponse.Response(ayType.ToString()));
|
||||
return Ok(ApiOkResponse.Response(aType.ToString()));
|
||||
|
||||
return Ok(ApiOkResponse.Response(BizObjectNameFetcherDirect.Name(ayType, id, ct)));
|
||||
return Ok(ApiOkResponse.Response(BizObjectNameFetcherDirect.Name(aType, id, ct)));
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user