fix(api): method fix
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user