mirror of https://github.com/abpframework/abp.git
7 changed files with 98 additions and 11 deletions
@ -0,0 +1,42 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace Volo.Docs.Documents |
|||
{ |
|||
[RemoteService] |
|||
[Area("docs")] |
|||
[ControllerName("Document")] |
|||
[Route("api/docs/documents")] |
|||
public class DocsDocumentController : AbpController, IDocumentAppService |
|||
{ |
|||
protected IDocumentAppService DocumentAppService { get; } |
|||
|
|||
public DocsDocumentController(IDocumentAppService documentAppService) |
|||
{ |
|||
DocumentAppService = documentAppService; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("")] |
|||
public virtual Task<DocumentWithDetailsDto> GetAsync(GetDocumentInput input) |
|||
{ |
|||
return DocumentAppService.GetAsync(input); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("default")] |
|||
public virtual Task<DocumentWithDetailsDto> GetDefaultAsync(GetDefaultDocumentInput input) |
|||
{ |
|||
return DocumentAppService.GetDefaultAsync(input); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("navigation")] |
|||
public virtual Task<DocumentWithDetailsDto> GetNavigationDocumentAsync(GetNavigationDocumentInput input) |
|||
{ |
|||
return DocumentAppService.GetNavigationDocumentAsync(input); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,43 @@ |
|||
using System.Threading.Tasks; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp; |
|||
using Volo.Abp.Application.Dtos; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace Volo.Docs.Projects |
|||
{ |
|||
[RemoteService] |
|||
[Area("docs")] |
|||
[ControllerName("Project")] |
|||
[Route("api/docs/projects")] |
|||
public class DocsProjectController : AbpController, IProjectAppService |
|||
{ |
|||
protected IProjectAppService ProjectAppService { get; } |
|||
|
|||
public DocsProjectController(IProjectAppService projectAppService) |
|||
{ |
|||
ProjectAppService = projectAppService; |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("")] |
|||
public virtual Task<ListResultDto<ProjectDto>> GetListAsync() |
|||
{ |
|||
return ProjectAppService.GetListAsync(); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{shortName}")] |
|||
public virtual Task<ProjectDto> GetAsync(string shortName) |
|||
{ |
|||
return ProjectAppService.GetAsync(shortName); |
|||
} |
|||
|
|||
[HttpGet] |
|||
[Route("{shortName}/versions")] |
|||
public virtual Task<ListResultDto<VersionInfoDto>> GetVersionsAsync(string shortName) |
|||
{ |
|||
return ProjectAppService.GetVersionsAsync(shortName); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue