17 lines
413 B
TypeScript
17 lines
413 B
TypeScript
import axios from "axios";
|
|
import { config as appConfig } from "../config";
|
|
|
|
export default async (name: string, className: string, config: string) => {
|
|
try {
|
|
const response = await axios.post(`${appConfig.url}/query/plugin/create`, {
|
|
name,
|
|
class: className,
|
|
config,
|
|
});
|
|
|
|
return response;
|
|
} catch (error) {
|
|
console.error("Error in creating project or query:", error);
|
|
}
|
|
};
|