You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
60 lines
1.4 KiB
60 lines
1.4 KiB
using Microsoft.AspNetCore.Mvc; |
|
using System.Threading.Tasks; |
|
using Volo.Abp; |
|
using Volo.Abp.Application.Dtos; |
|
using Volo.Abp.AspNetCore.Mvc; |
|
|
|
namespace Sanhe.Abp.LocalizationManagement; |
|
|
|
[RemoteService(Name = LocalizationRemoteServiceConsts.RemoteServiceName)] |
|
[Area("localization")] |
|
[Route("api/localization/texts")] |
|
public class TextController : AbpController, ITextAppService |
|
{ |
|
private readonly ITextAppService _service; |
|
|
|
public TextController(ITextAppService service) |
|
{ |
|
_service = service; |
|
} |
|
|
|
[HttpPost] |
|
public virtual Task<TextDto> CreateAsync(CreateTextInput input) |
|
{ |
|
return _service.CreateAsync(input); |
|
} |
|
|
|
[HttpDelete] |
|
[Route("{id}")] |
|
public virtual Task DeleteAsync(int id) |
|
{ |
|
return _service.DeleteAsync(id); |
|
} |
|
|
|
[HttpGet] |
|
[Route("{id}")] |
|
public virtual Task<TextDto> GetAsync(int id) |
|
{ |
|
return _service.GetAsync(id); |
|
} |
|
|
|
[HttpGet] |
|
[Route("by-culture-key")] |
|
public virtual Task<TextDto> GetByCultureKeyAsync(GetTextByKeyInput input) |
|
{ |
|
return _service.GetByCultureKeyAsync(input); |
|
} |
|
|
|
[HttpGet] |
|
public virtual Task<PagedResultDto<TextDifferenceDto>> GetListAsync(GetTextsInput input) |
|
{ |
|
return _service.GetListAsync(input); |
|
} |
|
|
|
[HttpPut] |
|
[Route("{id}")] |
|
public virtual Task<TextDto> UpdateAsync(int id, UpdateTextInput input) |
|
{ |
|
return _service.UpdateAsync(id, input); |
|
} |
|
}
|
|
|