From dc643ba44fd2a426263015491268a0f0d6b4671d Mon Sep 17 00:00:00 2001 From: lrj <owen.stl@gmail.com> Date: 星期三, 01 十月 2025 08:39:29 +0800 Subject: [PATCH] 删除包含test、check、fix的文件名的文件 --- web/src/api/carousel.js | 28 +--------------------------- 1 files changed, 1 insertions(+), 27 deletions(-) diff --git a/web/src/api/carousel.js b/web/src/api/carousel.js index 773f117..802b3f6 100644 --- a/web/src/api/carousel.js +++ b/web/src/api/carousel.js @@ -1,30 +1,4 @@ -const GRAPHQL_ENDPOINT = 'http://localhost:8080/api/graphql' - -// GraphQL璇锋眰鍑芥暟 -async function graphqlRequest(query, variables = {}) { - 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) - } - - return result.data -} +import { graphqlRequest } from '../config/api.ts' // GraphQL 鏌ヨ鍜屽彉鏇� const GET_CAROUSELS = ` -- Gitblit v1.8.0