16 lines
373 B
TypeScript
16 lines
373 B
TypeScript
import axios from "axios";
|
|
import { config } from "../config";
|
|
|
|
export default async (projectId: string, databaseNodeId: string) => {
|
|
try {
|
|
const response = await axios.post(`${config.url}/database/create`, {
|
|
projectId,
|
|
databaseNodeId,
|
|
});
|
|
|
|
return response.data;
|
|
} catch (error) {
|
|
console.error("Error in creating database:", error);
|
|
}
|
|
};
|