fix: resolve type errors and lint warnings in sync system

This commit is contained in:
2026-04-29 11:46:35 +08:00
parent a4cf2636e7
commit d79a2605ed
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -202,7 +202,7 @@ export const gameSyncRoutes = new Elysia({ prefix: "/games" })
return { error: guard.error }; return { error: guard.error };
} }
let gamesToSync: { id: string; steamAppId: number }[] = []; let gamesToSync: { id: string; steamAppId: number | null }[] = [];
if (body.mode === "all") { if (body.mode === "all") {
gamesToSync = await db gamesToSync = await db
@@ -248,6 +248,7 @@ export const gameSyncRoutes = new Elysia({ prefix: "/games" })
let failed = 0; let failed = 0;
for (const game of gamesToSync) { for (const game of gamesToSync) {
if (!game.steamAppId) continue;
const result = await syncSteamGame(game.steamAppId, { forceRetry: true }); const result = await syncSteamGame(game.steamAppId, { forceRetry: true });
if (result.success) synced++; if (result.success) synced++;
else failed++; else failed++;
+1 -1
View File
@@ -1,6 +1,6 @@
import { db } from "@/lib/db/index" import { db } from "@/lib/db/index"
import { games } from "@/lib/db/schema" import { games } from "@/lib/db/schema"
import { eq, sql } from "drizzle-orm" import { eq } from "drizzle-orm"
interface SteamAppDetails { interface SteamAppDetails {
steam_appid: number steam_appid: number