16 lines
365 B
TypeScript
16 lines
365 B
TypeScript
import axios from "axios";
|
|
import { config } from "tests/config";
|
|
|
|
export default async (name: string, sourcePath: string) => {
|
|
try {
|
|
const response = await axios.post(`${config.url}/query/module/create`, {
|
|
name,
|
|
sourcePath,
|
|
});
|
|
|
|
return response;
|
|
} catch (error) {
|
|
console.error("Error in creating project or query:", error);
|
|
}
|
|
};
|