You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
autoflow-web-console/src/components/service/management/ExternalAuthControllerServi...

43 lines
1.1 KiB

import {
AddFileParamsSwagger,
AddStorageParamsSwagger,
} from "@/components/models/management/ExternalAuthController";
import { request } from "@/components/service/index";
export const ExternalAuthControllerService = {
signIn: (id: string, password: string) => {
return request.post("/api/external-auth/signin", { id, password });
},
add: (params: AddFileParamsSwagger, file: File | Blob) => {
const fd = new FormData();
fd.append("file", file);
const { authId, ...rest } = params as any;
const snakeParams = { ...rest, auth_id: authId };
return request.postWithConfig("/api/external-auth/register-with-file", fd, {
params: snakeParams,
});
},
addStorage: (params: AddStorageParamsSwagger) => {
return request.postWithConfig(
"/api/external-auth/register-with-minio-file",
{},
{ params },
);
},
swSearch: (id: string, token: string) => {
return request.get("/api/external-auth/sw-search", {
id,
token,
});
},
edgeSearch: (id: string, token: string) => {
return request.get("/api/external-auth/edge-search", {
id,
token,
});
},
};