fix: resolve type errors and lint warnings in sync system
This commit is contained in:
+2
-1
@@ -202,7 +202,7 @@ export const gameSyncRoutes = new Elysia({ prefix: "/games" })
|
||||
return { error: guard.error };
|
||||
}
|
||||
|
||||
let gamesToSync: { id: string; steamAppId: number }[] = [];
|
||||
let gamesToSync: { id: string; steamAppId: number | null }[] = [];
|
||||
|
||||
if (body.mode === "all") {
|
||||
gamesToSync = await db
|
||||
@@ -248,6 +248,7 @@ export const gameSyncRoutes = new Elysia({ prefix: "/games" })
|
||||
let failed = 0;
|
||||
|
||||
for (const game of gamesToSync) {
|
||||
if (!game.steamAppId) continue;
|
||||
const result = await syncSteamGame(game.steamAppId, { forceRetry: true });
|
||||
if (result.success) synced++;
|
||||
else failed++;
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { db } from "@/lib/db/index"
|
||||
import { games } from "@/lib/db/schema"
|
||||
import { eq, sql } from "drizzle-orm"
|
||||
import { eq } from "drizzle-orm"
|
||||
|
||||
interface SteamAppDetails {
|
||||
steam_appid: number
|
||||
|
||||
Reference in New Issue
Block a user