Class UrlShortingAdminController
Inheritance
UrlShortingAdminController
Implements
Inherited Members
Namespace: Volo.CmsKit.Admin.UrlShorting
Assembly: Volo.CmsKit.Pro.Admin.HttpApi.dll
Syntax
[RequiresFeature(new string[] { "CmsKitPro.UrlShortingEnable" })]
[RequiresGlobalFeature(typeof(UrlShortingFeature))]
[RemoteService(true, Name = "CmsKitAdmin")]
[Area("cms-kit-pro-admin")]
[Route("api/cms-kit-admin/url-shorting")]
[Authorize("CmsKit.UrlShorting")]
public class UrlShortingAdminController : CmsKitProAdminController, IAvoidDuplicateCrossCuttingConcerns, IUrlShortingAdminAppService, ICrudAppService<ShortenedUrlDto, ShortenedUrlDto, Guid, GetShortenedUrlListInput, CreateShortenedUrlDto, UpdateShortenedUrlDto>, IReadOnlyAppService<ShortenedUrlDto, ShortenedUrlDto, Guid, GetShortenedUrlListInput>, ICreateUpdateAppService<ShortenedUrlDto, Guid, CreateShortenedUrlDto, UpdateShortenedUrlDto>, ICreateAppService<ShortenedUrlDto, CreateShortenedUrlDto>, IUpdateAppService<ShortenedUrlDto, Guid, UpdateShortenedUrlDto>, IDeleteAppService<Guid>, IApplicationService, IRemoteService
Constructors
UrlShortingAdminController(IUrlShortingAdminAppService)
Declaration
public UrlShortingAdminController(IUrlShortingAdminAppService urlShortingAdminAppService)
Parameters
Type | Name | Description |
---|---|---|
IUrlShortingAdminAppService | urlShortingAdminAppService |
Methods
CreateAsync(CreateShortenedUrlDto)
Declaration
[HttpPost]
[Authorize("CmsKit.UrlShorting.Create")]
public Task<ShortenedUrlDto> CreateAsync(CreateShortenedUrlDto input)
Parameters
Type | Name | Description |
---|---|---|
CreateShortenedUrlDto | input |
Returns
Type | Description |
---|---|
Task<ShortenedUrlDto> |
DeleteAsync(Guid)
Declaration
[HttpDelete]
[Route("{id}")]
[Authorize("CmsKit.UrlShorting.Delete")]
public Task DeleteAsync(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id |
Returns
Type | Description |
---|---|
Task |
GetAsync(Guid)
Declaration
[HttpGet]
[Route("{id}")]
public Task<ShortenedUrlDto> GetAsync(Guid id)
Parameters
Type | Name | Description |
---|---|---|
Guid | id |
Returns
Type | Description |
---|---|
Task<ShortenedUrlDto> |
GetListAsync(GetShortenedUrlListInput)
Declaration
[HttpGet]
public Task<PagedResultDto<ShortenedUrlDto>> GetListAsync(GetShortenedUrlListInput input)
Parameters
Type | Name | Description |
---|---|---|
GetShortenedUrlListInput | input |
Returns
Type | Description |
---|---|
Task<PagedResultDto<ShortenedUrlDto>> |
UpdateAsync(Guid, UpdateShortenedUrlDto)
Declaration
[HttpPut]
[Route("{id}")]
[Authorize("CmsKit.UrlShorting.Update")]
public Task<ShortenedUrlDto> UpdateAsync(Guid id, UpdateShortenedUrlDto input)
Parameters
Type | Name | Description |
---|---|---|
Guid | id | |
UpdateShortenedUrlDto | input |
Returns
Type | Description |
---|---|
Task<ShortenedUrlDto> |