mirror of https://github.com/abpframework/abp.git
4 changed files with 49 additions and 5 deletions
@ -0,0 +1,41 @@ |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using System; |
|||
using System.Collections.Generic; |
|||
using System.Linq; |
|||
using System.Text; |
|||
using System.Threading.Tasks; |
|||
using Volo.Abp; |
|||
using Volo.Abp.GlobalFeatures; |
|||
using Volo.CmsKit.GlobalFeatures; |
|||
using Volo.CmsKit.Permissions; |
|||
|
|||
namespace Volo.CmsKit.Admin.Blogs |
|||
{ |
|||
[RequiresGlobalFeature(typeof(BlogsFeature))] |
|||
[RemoteService(Name = CmsKitCommonRemoteServiceConsts.RemoteServiceName)] |
|||
[Area("cms-kit")] |
|||
[Authorize(CmsKitAdminPermissions.Blogs.Features)] |
|||
[Route("api/cms-kit-admin/blogs/{blogId}/features")] |
|||
public class BlogFeatureAdminController : CmsKitAdminController, IBlogFeatureAdminAppService |
|||
{ |
|||
protected IBlogFeatureAdminAppService BlogFeatureAdminAppService { get; } |
|||
|
|||
public BlogFeatureAdminController(IBlogFeatureAdminAppService blogFeatureAdminAppService) |
|||
{ |
|||
BlogFeatureAdminAppService = blogFeatureAdminAppService; |
|||
} |
|||
|
|||
[HttpGet] |
|||
public Task<List<BlogFeatureDto>> GetListAsync(Guid blogId) |
|||
{ |
|||
return BlogFeatureAdminAppService.GetListAsync(blogId); |
|||
} |
|||
|
|||
[HttpPut] |
|||
public Task SetAsync(Guid blogId, BlogFeatureDto dto) |
|||
{ |
|||
return BlogFeatureAdminAppService.SetAsync(blogId, dto); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue