fix(api): method fix

This commit is contained in:
2026-02-09 18:23:40 +08:00
parent 3f284d057c
commit 0fea0de600
5 changed files with 44 additions and 44 deletions

View File

@@ -7,7 +7,7 @@ import { Scheme } from "./typing"
export const getLabelSchemeList = (params: Scheme.ListRequest) => {
return httpFetch<Scheme.ListResponse>({
url: BASE_LABEL_API + "/api/v1/label_server/label_schema/list",
method: "get",
method: "GET",
data: params,
headerAttr: {
["Token"]: usePermissionStore.getState().token,
@@ -20,7 +20,7 @@ export const getLabelSchemeList = (params: Scheme.ListRequest) => {
export const addNewPlan = (data: Scheme.CreateProps) => {
return httpFetch({
url: BASE_LABEL_API + "/api/v1/label_server/label_schema/add",
method: "post",
method: "POST",
body: JSON.stringify(data),
headerAttr: {
["Token"]: usePermissionStore.getState().token,
@@ -35,7 +35,7 @@ export const getAllVersionByName = (name: string) => {
url:
BASE_LABEL_API +
`/api/v1/label_server/label_schema/version/list?name=${name}`,
method: "get",
method: "GET",
headerAttr: {
["Token"]: usePermissionStore.getState().token,
["Refresh-Token"]: usePermissionStore.getState().refresh_token,
@@ -62,7 +62,7 @@ export const saveWrongWordList = (data: {
}) => {
return httpFetch({
url: BASE_LABEL_API + "/api/v1/label_server/error_repository/save",
method: "post",
method: "POST",
body: JSON.stringify(data),
headerAttr: {
["Token"]: usePermissionStore.getState().token,
@@ -77,7 +77,7 @@ export const getWrongWordList = () => {
data: { error: string; correct: string }[]
}>({
url: BASE_LABEL_API + "/api/v1/label_server/error_repository/query",
method: "get",
method: "GET",
headerAttr: {
["Token"]: usePermissionStore.getState().token,
["Refresh-Token"]: usePermissionStore.getState().refresh_token,