From b39a0502e7941ce966fda53664cf1b04ba52d65f Mon Sep 17 00:00:00 2001
From: lrj <owen.stl@gmail.com>
Date: 星期三, 01 十月 2025 17:30:24 +0800
Subject: [PATCH] 清理测试文件:删除所有test、debug、fix、check_开头的文件,为重构做准备

---
 web/src/api/judge.ts |   28 ++--------------------------
 1 files changed, 2 insertions(+), 26 deletions(-)

diff --git a/web/src/api/judge.ts b/web/src/api/judge.ts
index 9319200..73fa1d9 100644
--- a/web/src/api/judge.ts
+++ b/web/src/api/judge.ts
@@ -1,33 +1,9 @@
 import { JUDGE_QUERIES, JUDGE_MUTATIONS } from './graphql'
 import type { Judge, JudgeInput, CosCredentials, Tag, Media } from './graphql'
 
-const GRAPHQL_ENDPOINT = 'http://localhost:8080/api/graphql'
+import { API_CONFIG, graphqlRequest } from '@/config/api'
 
-// GraphQL璇锋眰鍑芥暟
-async function graphqlRequest(query: string, variables: any = {}) {
-  const response = await fetch(GRAPHQL_ENDPOINT, {
-    method: 'POST',
-    headers: {
-      'Content-Type': 'application/json',
-    },
-    body: JSON.stringify({
-      query,
-      variables,
-    }),
-  })
-
-  if (!response.ok) {
-    throw new Error(`HTTP error! status: ${response.status}`)
-  }
-
-  const result = await response.json()
-  
-  if (result.errors) {
-    throw new Error(result.errors[0]?.message || 'GraphQL error')
-  }
-
-  return result.data
-}
+// 浣跨敤缁熶竴鐨凣raphQL璇锋眰鍑芥暟
 
 export class JudgeApi {
   // 鑾峰彇鎵�鏈夎瘎濮�

--
Gitblit v1.8.0