This commit is contained in:
@@ -72,7 +72,8 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Instantiate the business object handler
|
||||
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));
|
||||
LocaleBiz biz = LocaleBiz.GetBiz(ct, HttpContext);
|
||||
|
||||
var o = await biz.GetAsync(id);
|
||||
|
||||
@@ -101,7 +102,8 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Instantiate the business object handler
|
||||
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));
|
||||
LocaleBiz biz = LocaleBiz.GetBiz(ct, HttpContext);
|
||||
|
||||
var l = await biz.GetPickListAsync();
|
||||
return Ok(new ApiOkResponse(l));
|
||||
@@ -124,7 +126,8 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Instantiate the business object handler
|
||||
LocaleBiz biz = new LocaleBiz(ct, UserIdFromContext.Id(HttpContext.Items), UserRolesFromContext.Roles(HttpContext.Items));
|
||||
LocaleBiz biz = LocaleBiz.GetBiz(ct, HttpContext);
|
||||
//LocaleBiz biz = new LocaleBiz(ct, UserIdFromContext.Id(HttpContext.Items), UserRolesFromContext.Roles(HttpContext.Items));
|
||||
|
||||
var l = biz.LocaleKeyCoverage();
|
||||
return Ok(new ApiOkResponse(l));
|
||||
@@ -137,10 +140,10 @@ namespace AyaNova.Api.Controllers
|
||||
/// Required roles: Any
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="inObj">LocaleSubsetParam object defining the locale Id and a list of keys required</param>
|
||||
/// <param name="inObj">List of locale key strings</param>
|
||||
/// <returns>A key value array of localized text values</returns>
|
||||
[HttpPost("SubSet")]
|
||||
public async Task<IActionResult> SubSet([FromBody] LocaleSubsetParam inObj)
|
||||
public async Task<IActionResult> SubSet([FromBody] List<string> inObj)
|
||||
{
|
||||
if (serverState.IsClosed)
|
||||
{
|
||||
@@ -148,7 +151,10 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Instantiate the business object handler
|
||||
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));
|
||||
|
||||
//Instantiate the business object handler
|
||||
LocaleBiz biz = LocaleBiz.GetBiz(ct, HttpContext);
|
||||
|
||||
var l = await biz.GetSubset(inObj);
|
||||
return Ok(new ApiOkResponse(l));
|
||||
@@ -172,7 +178,8 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Instantiate the business object handler
|
||||
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));
|
||||
LocaleBiz biz = LocaleBiz.GetBiz(ct, HttpContext);
|
||||
|
||||
var o = await biz.DuplicateAsync(inObj);
|
||||
|
||||
@@ -232,7 +239,8 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Instantiate the business object handler
|
||||
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));
|
||||
LocaleBiz biz = LocaleBiz.GetBiz(ct, HttpContext);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -297,7 +305,8 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
//Instantiate the business object handler
|
||||
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));
|
||||
LocaleBiz biz = LocaleBiz.GetBiz(ct, HttpContext);
|
||||
|
||||
try
|
||||
{
|
||||
@@ -365,7 +374,8 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
|
||||
//Instantiate the business object handler
|
||||
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));
|
||||
LocaleBiz biz = LocaleBiz.GetBiz(ct, HttpContext);
|
||||
if (!biz.Delete(dbObj))
|
||||
{
|
||||
return BadRequest(new ApiErrorResponse(biz.Errors));
|
||||
@@ -395,19 +405,19 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
//------------
|
||||
|
||||
public class LocaleSubsetParam
|
||||
{
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
public long LocaleId { get; set; }
|
||||
[System.ComponentModel.DataAnnotations.Required]
|
||||
public List<string> Keys { get; set; }
|
||||
// public class LocaleSubsetParam
|
||||
// {
|
||||
// [System.ComponentModel.DataAnnotations.Required]
|
||||
// public long LocaleId { get; set; }
|
||||
// [System.ComponentModel.DataAnnotations.Required]
|
||||
// public List<string> Keys { get; set; }
|
||||
|
||||
public LocaleSubsetParam()
|
||||
{
|
||||
Keys = new List<string>();
|
||||
}
|
||||
// public LocaleSubsetParam()
|
||||
// {
|
||||
// Keys = new List<string>();
|
||||
// }
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
#if (DEBUG)
|
||||
public class LocaleCoverageInfo
|
||||
|
||||
Reference in New Issue
Block a user