feat: 更新标签列表获取逻辑,支持空数据处理

This commit is contained in:
2025-07-25 04:23:45 +08:00
parent d03730a7fa
commit 1cbfe60f8c
2 changed files with 3 additions and 3 deletions

View File

@ -3,8 +3,8 @@ import type { BaseResponse } from "@/models/resp";
import axiosClient from "./client";
export async function listLabels(): Promise<BaseResponse<Label[]>> {
const res = await axiosClient.get<BaseResponse<Label[]>>("/label/list", {
export async function listLabels(): Promise<BaseResponse<Label[] | null>> {
const res = await axiosClient.get<BaseResponse<Label[] | null>>("/label/list", {
});
return res.data;
}