ITranslation

This commit is contained in:
2020-05-24 18:40:30 +02:00
parent c9c0113557
commit 8cd27ac955
10 changed files with 63 additions and 82 deletions
+1 -23
View File
@@ -12,17 +12,12 @@ namespace zero.Debug.Controllers
{
public class TestController : Controller
{
IAppScope<ITranslationsApi> Api;
ITranslationsApi CurrentApi;
private readonly IActionDescriptorCollectionProvider _actionDescriptorCollectionProvider;
public TestController(IAppScope<ITranslationsApi> api, ITranslationsApi currentApi, IActionDescriptorCollectionProvider actionDescriptorCollectionProvider)
public TestController(IActionDescriptorCollectionProvider actionDescriptorCollectionProvider)
{
_actionDescriptorCollectionProvider = actionDescriptorCollectionProvider;
Api = api;
CurrentApi = currentApi;
}
@@ -57,23 +52,6 @@ namespace zero.Debug.Controllers
}
[HttpGet]
public async Task<IActionResult> Index()
{
IList<Translation> global = await Api.Global.GetAll();
IList<Translation> current = await CurrentApi.GetAll();
IList<Translation> appTwo = await Api.App("applications.2-A").GetAll();
IList<Translation> shared = await Api.Shared.GetAll();
return Json(new {
current,
global,
appTwo,
shared
});
}
[HttpGet]