oqtane.framework/Oqtane.Client/Services/SystemService.cs
2021-05-10 17:45:39 -04:00

25 lines
643 B
C#

using System.Net.Http;
using System.Threading.Tasks;
using System.Collections.Generic;
using Oqtane.Shared;
namespace Oqtane.Services
{
public class SystemService : ServiceBase, ISystemService
{
private readonly SiteState _siteState;
public SystemService(HttpClient http, SiteState siteState) : base(http)
{
_siteState = siteState;
}
private string Apiurl => CreateApiUrl("System", _siteState.Alias);
public async Task<Dictionary<string, string>> GetSystemInfoAsync()
{
return await GetJsonAsync<Dictionary<string, string>>(Apiurl);
}
}
}