16 lines
394 B
TypeScript
16 lines
394 B
TypeScript
import axios from "axios";
|
|
import { config } from "tests/config";
|
|
|
|
export default async (query: { id: string }, module: { id: string }) => {
|
|
try {
|
|
const response = await axios.post(`${config.url}/query/module/add`, {
|
|
queryId: query.id,
|
|
moduleId: module.id,
|
|
});
|
|
|
|
return response;
|
|
} catch (error) {
|
|
console.error("Error in adding module to query:", error);
|
|
}
|
|
};
|