Fix lint errors from review fixes
- Remove unused logger import (no longer needed after removing try/catch) - Remove unused OWNER_ID constant in test fixture - Use toSorted() instead of sort() in sendDraftOrderNotification https://claude.ai/code/session_01Tvwsv3LfL9JUqxoLct8dTn
This commit is contained in:
parent
1b28ca5e7c
commit
f65fbb4327
3 changed files with 1 additions and 3 deletions
|
|
@ -24,7 +24,6 @@ const SEASON_ID = "season-1";
|
||||||
const LEAGUE_ID = "league-1";
|
const LEAGUE_ID = "league-1";
|
||||||
const TEAM_ID = "team-1";
|
const TEAM_ID = "team-1";
|
||||||
const NEXT_TEAM_ID = "team-2";
|
const NEXT_TEAM_ID = "team-2";
|
||||||
const OWNER_ID = "owner-1";
|
|
||||||
const NEXT_OWNER_ID = "owner-2";
|
const NEXT_OWNER_ID = "owner-2";
|
||||||
const WEBHOOK_URL = "https://discord.com/api/webhooks/123/abc";
|
const WEBHOOK_URL = "https://discord.com/api/webhooks/123/abc";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -266,7 +266,7 @@ export async function sendDraftOrderNotification({
|
||||||
? `Draft Order Manually Set — ${leagueName}`
|
? `Draft Order Manually Set — ${leagueName}`
|
||||||
: `Draft Order Randomized — ${leagueName}`;
|
: `Draft Order Randomized — ${leagueName}`;
|
||||||
|
|
||||||
const sorted = [...teams].sort((a, b) => a.position - b.position);
|
const sorted = teams.toSorted((a, b) => a.position - b.position);
|
||||||
let description = sorted
|
let description = sorted
|
||||||
.map((t) => {
|
.map((t) => {
|
||||||
const teamLabel = escapeMarkdown(t.name);
|
const teamLabel = escapeMarkdown(t.name);
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,6 @@ import * as schema from "~/database/schema";
|
||||||
import type { database } from "~/database/context";
|
import type { database } from "~/database/context";
|
||||||
import { findDiscordIdsByUserIds } from "~/models/account";
|
import { findDiscordIdsByUserIds } from "~/models/account";
|
||||||
import { sendPickAnnouncementNotification } from "~/services/discord";
|
import { sendPickAnnouncementNotification } from "~/services/discord";
|
||||||
import { logger } from "~/lib/logger";
|
|
||||||
|
|
||||||
type DraftSlot = { teamId: string; draftOrder: number };
|
type DraftSlot = { teamId: string; draftOrder: number };
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue