Use REST style
This commit is contained in:
@ -6,8 +6,6 @@ namespace Oqtane.Services
|
||||
{
|
||||
public interface ILocalizationService
|
||||
{
|
||||
Task<Culture> GetDefaultCulture();
|
||||
|
||||
Task<IEnumerable<Culture>> GetSupportedCultures();
|
||||
Task<IEnumerable<Culture>> GetCulturesAsync();
|
||||
}
|
||||
}
|
||||
|
@ -17,9 +17,6 @@ namespace Oqtane.Services
|
||||
|
||||
private string Apiurl => CreateApiUrl(_siteState.Alias, "Localization");
|
||||
|
||||
public async Task<Culture> GetDefaultCulture() => await GetJsonAsync<Culture>($"{Apiurl}/getDefaultCulture");
|
||||
|
||||
public async Task<IEnumerable<Culture>> GetSupportedCultures()
|
||||
=> await GetJsonAsync<IEnumerable<Culture>>($"{Apiurl}/getSupportedCultures");
|
||||
public async Task<IEnumerable<Culture>> GetCulturesAsync() => await GetJsonAsync<IEnumerable<Culture>>(Apiurl);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user