This commit is contained in:
@@ -96,5 +96,38 @@ namespace AyaNova.Api.Controllers
|
|||||||
return NoContent();
|
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
|
}//eoc
|
||||||
}//ens
|
}//ens
|
||||||
Reference in New Issue
Block a user