Some Code Cleanup
This commit is contained in:
@@ -17,9 +17,9 @@
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
import type {FightStats, Ranking, UserStats} from "../types/stats.ts";
|
||||
import type {FightStats, Ranking, UserStats} from "@type/stats.ts";
|
||||
import {fetchWithToken} from "./repo.ts";
|
||||
import {FightStatsSchema, RankingSchema, UserStatsSchema} from "../types/stats.ts";
|
||||
import {FightStatsSchema, RankingSchema, UserStatsSchema} from "@type/stats.ts";
|
||||
|
||||
export class StatsRepo {
|
||||
|
||||
@@ -30,7 +30,7 @@ export class StatsRepo {
|
||||
}
|
||||
|
||||
public async getFightStats(): Promise<FightStats> {
|
||||
return await fetchWithToken(this.token, `/stats/fights`).then(value => value.json()).then(FightStatsSchema.parse);
|
||||
return await fetchWithToken(this.token, "/stats/fights").then(value => value.json()).then(FightStatsSchema.parse);
|
||||
}
|
||||
|
||||
public async getUserStats(id: number): Promise<UserStats> {
|
||||
|
||||
Reference in New Issue
Block a user