feature(database-connection): Fix routing and refactor style sheets
This commit is contained in:
@@ -2,8 +2,8 @@ import TableEntry from "../models/TableEntry";
|
||||
import UserStatsService from "../services/UserStatsService";
|
||||
import UserStatsResponse from "../models/UserStatsResponse";
|
||||
|
||||
export default class UserStatsMockService extends UserStatsService {
|
||||
private readonly mocks: UserStatsResponse[] = [
|
||||
export default class UserStatsMockService {
|
||||
private static readonly mocks: UserStatsResponse[] = [
|
||||
{
|
||||
seasonId: "1",
|
||||
dates: {
|
||||
@@ -36,11 +36,12 @@ export default class UserStatsMockService extends UserStatsService {
|
||||
}
|
||||
]
|
||||
|
||||
async getStats(seasonId: string): Promise<UserStatsResponse> {
|
||||
static async getStats(seasonId: string): Promise<UserStatsResponse> {
|
||||
|
||||
return Promise.resolve(this.mocks[Number(seasonId) - 1])
|
||||
}
|
||||
|
||||
getStatsWithoutPromise(seasonId: string): UserStatsResponse {
|
||||
static getStatsWithoutPromise(seasonId: string): UserStatsResponse {
|
||||
return this.mocks[Number(seasonId) - 1]
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user