This commit is contained in:
2020-01-27 23:53:08 +00:00
parent 6fec435d94
commit 7c14567e3c
2 changed files with 8 additions and 9 deletions

View File

@@ -113,7 +113,7 @@ namespace AyaNova.Api.Controllers
/// </summary> /// </summary>
/// <returns>Report of all unique locale keys requested since last server reboot</returns> /// <returns>Report of all unique locale keys requested since last server reboot</returns>
[HttpGet("LocaleKeyCoverage")] [HttpGet("LocaleKeyCoverage")]
public ActionResult LocaleKeyCoverage() public async Task<IActionResult> LocaleKeyCoverage()
{ {
if (serverState.IsClosed) if (serverState.IsClosed)
{ {
@@ -124,7 +124,7 @@ namespace AyaNova.Api.Controllers
LocaleBiz biz = LocaleBiz.GetBiz(ct, HttpContext); LocaleBiz biz = LocaleBiz.GetBiz(ct, HttpContext);
//LocaleBiz biz = new LocaleBiz(ct, UserIdFromContext.Id(HttpContext.Items), UserRolesFromContext.Roles(HttpContext.Items)); //LocaleBiz biz = new LocaleBiz(ct, UserIdFromContext.Id(HttpContext.Items), UserRolesFromContext.Roles(HttpContext.Items));
var l = biz.LocaleKeyCoverageAsync(); var l = await biz.LocaleKeyCoverageAsync();
return Ok(ApiOkResponse.Response(l, true)); return Ok(ApiOkResponse.Response(l, true));
} }
#endif #endif
@@ -194,7 +194,7 @@ namespace AyaNova.Api.Controllers
/// <param name="inObj">NewText/Id/Concurrency token object. NewText is new display text, Id is LocaleItem Id, concurrency token is required</param> /// <param name="inObj">NewText/Id/Concurrency token object. NewText is new display text, Id is LocaleItem Id, concurrency token is required</param>
/// <returns></returns> /// <returns></returns>
[HttpPut("UpdateLocaleItemDisplayText")] [HttpPut("UpdateLocaleItemDisplayText")]
public async Task<IActionResult> PutLocalItemDisplyaText([FromBody] NewTextIdConcurrencyTokenItem inObj) public async Task<IActionResult> PutLocalItemDisplayText([FromBody] NewTextIdConcurrencyTokenItem inObj)
{ {
if (!serverState.IsOpen) if (!serverState.IsOpen)
{ {

View File

@@ -1,5 +1,4 @@
using System; using System.Threading.Tasks;
using System.Collections.Generic;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Routing; using Microsoft.AspNetCore.Routing;
using Microsoft.Extensions.Logging; using Microsoft.Extensions.Logging;
@@ -47,14 +46,14 @@ namespace AyaNova.Api.Controllers
/// <param name="query">The query to filter the returned list by</param> /// <param name="query">The query to filter the returned list by</param>
/// <returns>Filtered list (maximum 25 items are returned for any query)</returns> /// <returns>Filtered list (maximum 25 items are returned for any query)</returns>
[HttpGet("picklist")] [HttpGet("picklist")]
public ActionResult GetPickList([FromQuery]string query) public async Task<IActionResult> GetPickList([FromQuery]string query)
{ {
if (!serverState.IsOpen) if (!serverState.IsOpen)
{ {
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason)); return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
} }
return Ok(ApiOkResponse.Response(TagUtil.PickListFilteredAsync(ct, query),true)); return Ok(ApiOkResponse.Response(await TagUtil.PickListFilteredAsync(ct, query), true));
} }
@@ -65,14 +64,14 @@ namespace AyaNova.Api.Controllers
/// <param name="query">The query to filter the returned list by</param> /// <param name="query">The query to filter the returned list by</param>
/// <returns>List</returns> /// <returns>List</returns>
[HttpGet("cloudlist")] [HttpGet("cloudlist")]
public ActionResult GetCloudList([FromQuery]string query) public async Task<IActionResult> GetCloudList([FromQuery]string query)
{ {
if (!serverState.IsOpen) if (!serverState.IsOpen)
{ {
return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason)); return StatusCode(503, new ApiErrorResponse(ApiErrorCode.API_CLOSED, null, serverState.Reason));
} }
return Ok(ApiOkResponse.Response(TagUtil.CloudListFilteredAsync(ct, query), true)); return Ok(ApiOkResponse.Response(await TagUtil.CloudListFilteredAsync(ct, query), true));
} }