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.
61 lines
1.5 KiB
61 lines
1.5 KiB
using Microsoft.AspNetCore.Mvc; |
|
using System; |
|
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/languages")] |
|
public class LanguageController : AbpController, ILanguageAppService |
|
{ |
|
private readonly ILanguageAppService _service; |
|
|
|
public LanguageController(ILanguageAppService service) |
|
{ |
|
_service = service; |
|
} |
|
|
|
[HttpPost] |
|
public virtual Task<LanguageDto> CreateAsync(CreateOrUpdateLanguageInput input) |
|
{ |
|
return _service.CreateAsync(input); |
|
} |
|
|
|
[HttpDelete] |
|
[Route("{id}")] |
|
public virtual Task DeleteAsync(Guid id) |
|
{ |
|
return _service.DeleteAsync(id); |
|
} |
|
|
|
[HttpGet] |
|
[Route("all")] |
|
public virtual Task<ListResultDto<LanguageDto>> GetAllAsync() |
|
{ |
|
return _service.GetAllAsync(); |
|
} |
|
|
|
[HttpGet] |
|
[Route("{id}")] |
|
public virtual Task<LanguageDto> GetAsync(Guid id) |
|
{ |
|
return _service.GetAsync(id); |
|
} |
|
|
|
[HttpGet] |
|
public virtual Task<PagedResultDto<LanguageDto>> GetListAsync(GetLanguagesInput input) |
|
{ |
|
return _service.GetListAsync(input); |
|
} |
|
|
|
[HttpPut] |
|
[Route("{id}")] |
|
public virtual Task<LanguageDto> UpdateAsync(Guid id, CreateOrUpdateLanguageInput input) |
|
{ |
|
return _service.UpdateAsync(id, input); |
|
} |
|
}
|
|
|