Use new projects API
This commit is contained in:
parent
11bca4cf53
commit
8bf483b334
24 changed files with 141 additions and 222 deletions
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue