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