|
|
|
@ -52,6 +52,52 @@ class ScoreboardService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static async getDailyMediumEnigmaStats() {
|
|
|
|
|
try {
|
|
|
|
|
const response = await fetch(ADRESSE_DBSERVER + '/scoreboard/getDailyMediumEnigma', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
},
|
|
|
|
|
credentials: 'include',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (response.ok) {
|
|
|
|
|
const result = await response.json();
|
|
|
|
|
return result;
|
|
|
|
|
} else {
|
|
|
|
|
const errorResponse = await response.json();
|
|
|
|
|
throw new Error(errorResponse.error);
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error(error);
|
|
|
|
|
throw error;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static async getDailyHardEnigmaStats() {
|
|
|
|
|
try {
|
|
|
|
|
const response = await fetch(ADRESSE_DBSERVER + '/scoreboard/getDailyHardEnigma', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
},
|
|
|
|
|
credentials: 'include',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (response.ok) {
|
|
|
|
|
const result = await response.json();
|
|
|
|
|
return result;
|
|
|
|
|
} else {
|
|
|
|
|
const errorResponse = await response.json();
|
|
|
|
|
throw new Error(errorResponse.error);
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error(error);
|
|
|
|
|
throw error;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static async getDailyOnlineStats() {
|
|
|
|
|
try {
|
|
|
|
|
const response = await fetch(ADRESSE_DBSERVER + '/scoreboard/getDailyOnline', {
|
|
|
|
@ -125,6 +171,52 @@ class ScoreboardService {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static async getWeeklyMediumEnigmaStats() {
|
|
|
|
|
try {
|
|
|
|
|
const response = await fetch(ADRESSE_DBSERVER + '/scoreboard/getWeeklyMediumEnigma', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
},
|
|
|
|
|
credentials: 'include',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (response.ok) {
|
|
|
|
|
const result = await response.json();
|
|
|
|
|
return result;
|
|
|
|
|
} else {
|
|
|
|
|
const errorResponse = await response.json();
|
|
|
|
|
throw new Error(errorResponse.error);
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error(error);
|
|
|
|
|
throw error;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static async getWeeklyHardEnigmaStats() {
|
|
|
|
|
try {
|
|
|
|
|
const response = await fetch(ADRESSE_DBSERVER + '/scoreboard/getWeeklyHardEnigma', {
|
|
|
|
|
method: 'GET',
|
|
|
|
|
headers: {
|
|
|
|
|
'Content-Type': 'application/json',
|
|
|
|
|
},
|
|
|
|
|
credentials: 'include',
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
if (response.ok) {
|
|
|
|
|
const result = await response.json();
|
|
|
|
|
return result;
|
|
|
|
|
} else {
|
|
|
|
|
const errorResponse = await response.json();
|
|
|
|
|
throw new Error(errorResponse.error);
|
|
|
|
|
}
|
|
|
|
|
} catch (error) {
|
|
|
|
|
console.error(error);
|
|
|
|
|
throw error;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static async getWeeklyOnlineStats() {
|
|
|
|
|
try {
|
|
|
|
|
const response = await fetch(ADRESSE_DBSERVER + '/scoreboard/getWeeklyOnline', {
|
|
|
|
|