This commit is contained in:
2020-01-21 23:09:57 +00:00
parent 5a5a7e5289
commit 7bb23fedd3
2 changed files with 8 additions and 5 deletions

View File

@@ -26,6 +26,9 @@ namespace AyaNova.Api.ControllerHelpers
[FromQuery]
public bool Mini { get; set; }
[FromQuery, Required]
public string DataListKey { get; set; }
}

View File

@@ -9,6 +9,7 @@ using AyaNova.Api.ControllerHelpers;
using AyaNova.Biz;
using AyaNova.DataList;
using System.Threading.Tasks;
using System.ComponentModel.DataAnnotations;
namespace AyaNova.Api.Controllers
{
@@ -63,15 +64,14 @@ namespace AyaNova.Api.Controllers
}
";
long UserId = UserIdFromContext.Id(HttpContext.Items);
ApiPagedResponse pr = await DataListFetcher.GetResponse(nameof(WidgetDataList), ct, Url, nameof(List), listOptions, MOCK_WIDGET_DISPLAY_TEMPLATE_JSON, UserId);
long UserId = UserIdFromContext.Id(HttpContext.Items);
ApiPagedResponse pr = await DataListFetcher.GetResponse(listOptions.DataListKey, ct, Url, nameof(List), listOptions, MOCK_WIDGET_DISPLAY_TEMPLATE_JSON, UserId);
// ApiPagedResponse pr = biz.GetList(Url, nameof(List), listOptions).Result;
return Ok(new ApiOkWithPagingResponse(pr));
}
/// <summary>
/// List of all DataList keys available
///