feat: enhance database management with new migration and database node functionalities, including CRUD operations and test cases
This commit is contained in:
22
tests/functions/createDatabaseNode.ts
Normal file
22
tests/functions/createDatabaseNode.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { config } from "../config";
|
||||
import axios from "axios";
|
||||
|
||||
export default async (
|
||||
host: string,
|
||||
port: number,
|
||||
username: string,
|
||||
password: string
|
||||
) => {
|
||||
try {
|
||||
const response = await axios.post(`${config.url}/database/node/create`, {
|
||||
host,
|
||||
port,
|
||||
username,
|
||||
password,
|
||||
});
|
||||
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error("Error in creating database node:", error);
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user