|
|
|
@ -27,7 +27,7 @@ namespace Blazor.Services
|
|
|
|
|
public async Task<Chapter> GetById(int id)
|
|
|
|
|
{
|
|
|
|
|
// Get the current data
|
|
|
|
|
var currentData = _http.GetFromJsonAsync<List<Chapter>>($"https://trusting-panini.87-106-126-109.plesk.page/api/chapters"+"/"+Token.TOKEN_ID).Result;
|
|
|
|
|
var currentData = _http.GetFromJsonAsync<List<Chapter>>($"https://trusting-panini.87-106-126-109.plesk.page/api/chapters"+"/"+API.TOKEN).Result;
|
|
|
|
|
|
|
|
|
|
// Get the chapter int the list
|
|
|
|
|
var chapter = currentData.FirstOrDefault(w => w.Id == id);
|
|
|
|
@ -87,7 +87,7 @@ namespace Blazor.Services
|
|
|
|
|
{
|
|
|
|
|
// Get the current data
|
|
|
|
|
//var currentData = await _localStorage.GetItemAsync<List<Chapter>>("data");
|
|
|
|
|
var currentData = _http.GetFromJsonAsync<List<Chapter>>($"https://trusting-panini.87-106-126-109.plesk.page/api/chapters"+"/"+Token.TOKEN_ID).Result;
|
|
|
|
|
var currentData = _http.GetFromJsonAsync<List<Chapter>>($"https://trusting-panini.87-106-126-109.plesk.page/api/chapters"+"/"+API.TOKEN).Result;
|
|
|
|
|
|
|
|
|
|
// Get the chapter int the list
|
|
|
|
|
var chapter = currentData.FirstOrDefault(w => w.Id == id);
|
|
|
|
@ -134,7 +134,7 @@ namespace Blazor.Services
|
|
|
|
|
public async Task<Administrator> GetAdminById(int id)
|
|
|
|
|
{
|
|
|
|
|
// Get the current data
|
|
|
|
|
var currentData = _http.GetFromJsonAsync<List<Administrator>>($"https://trusting-panini.87-106-126-109.plesk.page/api/administrators"+"/"+Token.TOKEN_ID).Result;
|
|
|
|
|
var currentData = _http.GetFromJsonAsync<List<Administrator>>($"https://trusting-panini.87-106-126-109.plesk.page/api/administrators"+"/"+API.TOKEN).Result;
|
|
|
|
|
|
|
|
|
|
// Get the admin int the list
|
|
|
|
|
var admin = currentData.FirstOrDefault(w => w.Id == id);
|
|
|
|
@ -227,7 +227,7 @@ namespace Blazor.Services
|
|
|
|
|
public async Task<Question> GetQuestionById(int id)
|
|
|
|
|
{
|
|
|
|
|
// Get the current data
|
|
|
|
|
var currentData = _http.GetFromJsonAsync<List<Question>>($"https://trusting-panini.87-106-126-109.plesk.page/api/questions"+"/"+Token.TOKEN_ID).Result;
|
|
|
|
|
var currentData = _http.GetFromJsonAsync<List<Question>>($"https://trusting-panini.87-106-126-109.plesk.page/api/questions"+"/"+API.TOKEN).Result;
|
|
|
|
|
|
|
|
|
|
// Get the question int the list
|
|
|
|
|
var question = currentData.FirstOrDefault(w => w.Id == id);
|
|
|
|
@ -319,7 +319,7 @@ namespace Blazor.Services
|
|
|
|
|
public async Task<Player> GetPlayerById(int id)
|
|
|
|
|
{
|
|
|
|
|
// Get the current data
|
|
|
|
|
var currentData = _http.GetFromJsonAsync<List<Player>>($"https://trusting-panini.87-106-126-109.plesk.page/api/players"+"/"+Token.TOKEN_ID).Result;
|
|
|
|
|
var currentData = _http.GetFromJsonAsync<List<Player>>($"https://trusting-panini.87-106-126-109.plesk.page/api/players"+"/"+API.TOKEN).Result;
|
|
|
|
|
|
|
|
|
|
// Get the player in the list
|
|
|
|
|
var player = currentData.FirstOrDefault(w => w.Id == id);
|
|
|
|
|