reactions, match sse, etc

This commit is contained in:
yohlo
2025-09-19 14:08:36 -05:00
parent 602e6e3473
commit f99d6efaf9
20 changed files with 474 additions and 100 deletions

View File

@@ -7,7 +7,6 @@ import { Match } from "@/features/matches/types";
export function createTeamsService(pb: PocketBase) {
return {
async getTeamInfo(id: string): Promise<TeamInfo> {
logger.info("PocketBase | Getting team info", id);
const result = await pb.collection("teams").getOne(id, {
fields: "id,name,primary_color,accent_color,logo",
expand: "players"
@@ -25,7 +24,6 @@ export function createTeamsService(pb: PocketBase) {
},
async getTeam(id: string): Promise<Team | null> {
logger.info("PocketBase | Getting team", id);
const result = await pb.collection("teams").getOne(id, {
expand: "players, tournaments",
});
@@ -84,7 +82,6 @@ export function createTeamsService(pb: PocketBase) {
},
async getTeamStats(id: string): Promise<TeamStats | null> {
logger.info("PocketBase | Getting team stats", id);
try {
const result = await pb.collection("team_stats").getFirstListItem(`team_id="${id}"`);
return result as unknown as TeamStats;