Modify aygetname postgres function to handle translation of items that do not have a name, also code to back it at server
This commit is contained in:
@@ -85,10 +85,12 @@ namespace AyaNova.Api.Controllers
|
||||
DataListSavedFilterBiz filterbiz = DataListSavedFilterBiz.GetBiz(ct, HttpContext);
|
||||
SavedFilter = await filterbiz.GetAsync(tableRequest.FilterId);
|
||||
}
|
||||
var DataList = DataListFactory.GetAyaDataList(tableRequest.DataListKey);
|
||||
var DataList = DataListFactory.GetAyaDataList(tableRequest.DataListKey, UserTranslationIdFromContext.Id(HttpContext.Items));
|
||||
if (DataList == null)
|
||||
return BadRequest(new ApiErrorResponse(ApiErrorCode.NOT_FOUND, "DataListKey", $"DataList \"{tableRequest.DataListKey}\" specified does not exist"));
|
||||
|
||||
|
||||
|
||||
//check rights
|
||||
if (!UserRoles.HasAnyFlags(DataList.AllowedRoles))
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
@@ -172,7 +174,7 @@ namespace AyaNova.Api.Controllers
|
||||
if (!serverState.IsOpen && UserIdFromContext.Id(HttpContext.Items) != 1)//bypass for superuser to fix fundamental problems
|
||||
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
|
||||
|
||||
var DataList = DataListFactory.GetAyaDataList(DataListKey);
|
||||
var DataList = DataListFactory.GetAyaDataList(DataListKey, UserTranslationIdFromContext.Id(HttpContext.Items));
|
||||
//was the name not found as a list?
|
||||
if (DataList == null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user