diff --git a/src/lib/xbox-server.ts b/src/lib/xbox-server.ts deleted file mode 100644 index d25b039..0000000 --- a/src/lib/xbox-server.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { getXboxProfileWithAvatar } from "./xbox"; - -/** - * Server-side helper to fetch Xbox profile data using environment variables - * This function can only be called on the server side - */ -export async function getXboxProfileServer(gamertag: string): Promise<{ - gamertag: string; - avatarUrl: string; - error?: string; -}> { - try { - // Use the modified function that reads from environment variables - const result = await getXboxProfileWithAvatar(gamertag); - - return result; - - } catch (error) { - console.error("Failed to fetch Xbox profile:", error); - - // Return fallback data on error - return { - gamertag, - avatarUrl: "", - error: "Failed to fetch profile data" - }; - } -}