This commit is contained in:
2020-03-25 18:40:03 +00:00
parent 127d113f8f
commit 0302add504

View File

@@ -96,5 +96,38 @@ namespace AyaNova.Api.Controllers
return NoContent();
}
/// <summary>
/// Get Client app relevant GlobalBizSettings
/// </summary>
/// <returns>Global settings object</returns>
[HttpGet("client")]
public ActionResult GetClientGlobalBizSettings()
{
if (serverState.IsClosed)
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
//Instantiate the business object handler
// GlobalBizSettingsBiz biz = GlobalBizSettingsBiz.GetBiz(ct, HttpContext);
//this route is available to any logged in user as it contains a subset of limited options relevant to any logged in user
// if (!Authorized.HasReadFullRole(HttpContext.Items, biz.BizType))
// return StatusCode(403, new ApiNotAuthorizedResponse());
if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState));
// var o = await biz.GetAsync();
// if (o == null)
// return NotFound(new ApiErrorResponse(ApiErrorCode.NOT_FOUND));
//new object with only relevant items in it
var ret = new
{
SearchCaseSensitiveOnly = AyaNova.Util.ServerGlobalBizSettings.SearchCaseSensitiveOnly
};
return Ok(ApiOkResponse.Response(ret, true));
}
}//eoc
}//ens