mirror of https://github.com/abpframework/abp.git
7 changed files with 44 additions and 95 deletions
@ -1,13 +0,0 @@ |
|||||
using System.ComponentModel.DataAnnotations; |
|
||||
|
|
||||
namespace Volo.CmsKit.Public.Tags |
|
||||
{ |
|
||||
public class GetRelatedTagsInput |
|
||||
{ |
|
||||
[Required] |
|
||||
public string EntityType { get; set; } |
|
||||
|
|
||||
[Required] |
|
||||
public string EntityId { get; set; } |
|
||||
} |
|
||||
} |
|
||||
@ -1,27 +0,0 @@ |
|||||
using Microsoft.AspNetCore.Mvc; |
|
||||
using System.Collections.Generic; |
|
||||
using System.Threading.Tasks; |
|
||||
using Volo.Abp; |
|
||||
using Volo.CmsKit.Tags; |
|
||||
|
|
||||
namespace Volo.CmsKit.Public.Tags |
|
||||
{ |
|
||||
[RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] |
|
||||
[Area("cms-kit")] |
|
||||
[Route("api/cms-kit/tags")] |
|
||||
public class TagController : CmsKitPublicControllerBase, ITagAppService |
|
||||
{ |
|
||||
protected readonly ITagAppService TagAppService; |
|
||||
|
|
||||
public TagController(ITagAppService tagAppService) |
|
||||
{ |
|
||||
TagAppService = tagAppService; |
|
||||
} |
|
||||
|
|
||||
[HttpGet] |
|
||||
public Task<List<TagDto>> GetAllRelatedTagsAsync(GetRelatedTagsInput input) |
|
||||
{ |
|
||||
return TagAppService.GetAllRelatedTagsAsync(input); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
@ -0,0 +1,31 @@ |
|||||
|
using Microsoft.AspNetCore.Mvc; |
||||
|
using System.Collections.Generic; |
||||
|
using System.Threading.Tasks; |
||||
|
using Volo.Abp; |
||||
|
using Volo.Abp.GlobalFeatures; |
||||
|
using Volo.CmsKit.GlobalFeatures; |
||||
|
using Volo.CmsKit.Tags; |
||||
|
|
||||
|
namespace Volo.CmsKit.Public.Tags |
||||
|
{ |
||||
|
[RequiresGlobalFeature(typeof(TagsFeature))] |
||||
|
[RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] |
||||
|
[Area("cms-kit")] |
||||
|
[Route("api/cms-kit-public/tags")] |
||||
|
public class TagPublicController : CmsKitPublicControllerBase, ITagAppService |
||||
|
{ |
||||
|
protected readonly ITagAppService TagAppService; |
||||
|
|
||||
|
public TagPublicController(ITagAppService tagAppService) |
||||
|
{ |
||||
|
TagAppService = tagAppService; |
||||
|
} |
||||
|
|
||||
|
[HttpGet] |
||||
|
[Route("{entityType}/{entityId}")] |
||||
|
public Task<List<TagDto>> GetAllRelatedTagsAsync(string entityType, string entityId) |
||||
|
{ |
||||
|
return TagAppService.GetAllRelatedTagsAsync(entityType, entityId); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue