Fix casing for constructor params
This commit is contained in:
@ -10,15 +10,15 @@ namespace Oqtane.Services
|
||||
{
|
||||
public class JobLogService : ServiceBase, IJobLogService
|
||||
{
|
||||
private readonly HttpClient http;
|
||||
private readonly HttpClient _http;
|
||||
private readonly SiteState _siteState;
|
||||
private readonly NavigationManager _navigationManager;
|
||||
|
||||
public JobLogService(HttpClient http, SiteState sitestate, NavigationManager NavigationManager)
|
||||
public JobLogService(HttpClient http, SiteState siteState, NavigationManager navigationManager)
|
||||
{
|
||||
http = http;
|
||||
_siteState = sitestate;
|
||||
_navigationManager = NavigationManager;
|
||||
_http = http;
|
||||
_siteState = siteState;
|
||||
_navigationManager = navigationManager;
|
||||
}
|
||||
|
||||
private string apiurl
|
||||
@ -28,27 +28,27 @@ namespace Oqtane.Services
|
||||
|
||||
public async Task<List<JobLog>> GetJobLogsAsync()
|
||||
{
|
||||
List<JobLog> Joblogs = await http.GetJsonAsync<List<JobLog>>(apiurl);
|
||||
List<JobLog> Joblogs = await _http.GetJsonAsync<List<JobLog>>(apiurl);
|
||||
return Joblogs.OrderBy(item => item.StartDate).ToList();
|
||||
}
|
||||
|
||||
public async Task<JobLog> GetJobLogAsync(int JobLogId)
|
||||
{
|
||||
return await http.GetJsonAsync<JobLog>(apiurl + "/" + JobLogId.ToString());
|
||||
return await _http.GetJsonAsync<JobLog>(apiurl + "/" + JobLogId.ToString());
|
||||
}
|
||||
|
||||
public async Task<JobLog> AddJobLogAsync(JobLog Joblog)
|
||||
{
|
||||
return await http.PostJsonAsync<JobLog>(apiurl, Joblog);
|
||||
return await _http.PostJsonAsync<JobLog>(apiurl, Joblog);
|
||||
}
|
||||
|
||||
public async Task<JobLog> UpdateJobLogAsync(JobLog Joblog)
|
||||
{
|
||||
return await http.PutJsonAsync<JobLog>(apiurl + "/" + Joblog.JobLogId.ToString(), Joblog);
|
||||
return await _http.PutJsonAsync<JobLog>(apiurl + "/" + Joblog.JobLogId.ToString(), Joblog);
|
||||
}
|
||||
public async Task DeleteJobLogAsync(int JobLogId)
|
||||
{
|
||||
await http.DeleteAsync(apiurl + "/" + JobLogId.ToString());
|
||||
await _http.DeleteAsync(apiurl + "/" + JobLogId.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user