- Added ManyToMany relationship for plugins in Query entity. - Updated QueryExecuterController to accept structured query data. - Enhanced QueryExecuterService to support plugin initialization and execution. - Implemented QueryHandlerService methods for creating and updating queries, modules, and plugins. - Introduced new endpoints for creating and adding modules and plugins to queries. - Created Plugin base class and DatabasePlugin implementation for database interactions. - Updated VM class to integrate plugin functionality during script execution. - Added test cases for project, query, module, and plugin operations.
15 lines
324 B
TypeScript
15 lines
324 B
TypeScript
import axios from "axios";
|
|
|
|
export default async (token: string, queryData: Record<string, any>) => {
|
|
try {
|
|
const response = await axios.post(
|
|
`http://localhost:3000/query/run/${token}`,
|
|
queryData
|
|
);
|
|
|
|
return response;
|
|
} catch (error) {
|
|
console.error("Error in running query:", error);
|
|
}
|
|
};
|