Use new projects API

This commit is contained in:
Robert Marshall 2020-04-12 11:09:04 +01:00
parent 11bca4cf53
commit 8bf483b334
24 changed files with 141 additions and 222 deletions

View file

@ -5,14 +5,14 @@ using Website.Data;
namespace Website.ViewComponents {
public class ProjectNavigationViewComponent :ViewComponent {
private readonly GitServerApi _api;
private readonly IGitApi _api;
public ProjectNavigationViewComponent(GitServerApi api) {
public ProjectNavigationViewComponent(IGitApi api) {
_api = api;
}
public async Task<IViewComponentResult> InvokeAsync() {
var repositories = await _api.GetRepositories();
var repositories = await _api.GetRepositories("rob");
return View(repositories.Take(5));
}
}