refactor(api): 简化 API 路径定义,移除 API_V1_PREFIX

更新多个 API 文件,将 API_V1_PREFIX 替换为直接使用 /admin 路径。
简化 API 路径定义逻辑,提升代码可读性与维护性。
统一后台管理接口的路由配置,确保各管理端 API 端点保持一致性。
This commit is contained in:
2026-05-29 10:29:11 +08:00
parent 27727f6371
commit d90ca3c66b
24 changed files with 31 additions and 48 deletions

View File

@@ -1,7 +1,6 @@
import { hasLotteryAdminApiBaseUrl, publicAdminRequest } from "@/lib/admin-http";
import type { DrawCurrentSnapshot } from "@/types/api/public-draw";
import { API_V1_PREFIX } from "@/api/paths";
/** 大厅当前期(无需 Bearer */
export async function getDrawCurrent(): Promise<DrawCurrentSnapshot | null> {
@@ -10,7 +9,7 @@ export async function getDrawCurrent(): Promise<DrawCurrentSnapshot | null> {
}
try {
return await publicAdminRequest<DrawCurrentSnapshot | null>({
url: `${API_V1_PREFIX}/draw/current`,
url: `/draw/current`,
method: "GET",
});
} catch {