|
|
|
@ -1,27 +1,27 @@
|
|
|
|
|
import axios from 'axios'; |
|
|
|
|
|
|
|
|
|
const extPgProject = { |
|
|
|
|
title: 'pgExtREST', |
|
|
|
|
bases: [ |
|
|
|
|
{ |
|
|
|
|
type: 'pg', |
|
|
|
|
config: { |
|
|
|
|
client: 'pg', |
|
|
|
|
connection: { |
|
|
|
|
host: 'localhost', |
|
|
|
|
port: '5432', |
|
|
|
|
user: 'postgres', |
|
|
|
|
password: 'password', |
|
|
|
|
database: 'postgres', |
|
|
|
|
}, |
|
|
|
|
searchPath: ['public'], |
|
|
|
|
}, |
|
|
|
|
inflection_column: 'camelize', |
|
|
|
|
inflection_table: 'camelize', |
|
|
|
|
}, |
|
|
|
|
], |
|
|
|
|
external: true, |
|
|
|
|
}; |
|
|
|
|
// const extPgProject = {
|
|
|
|
|
// title: 'pgExtREST',
|
|
|
|
|
// bases: [
|
|
|
|
|
// {
|
|
|
|
|
// type: 'pg',
|
|
|
|
|
// config: {
|
|
|
|
|
// client: 'pg',
|
|
|
|
|
// connection: {
|
|
|
|
|
// host: 'localhost',
|
|
|
|
|
// port: '5432',
|
|
|
|
|
// user: 'postgres',
|
|
|
|
|
// password: 'password',
|
|
|
|
|
// database: 'postgres',
|
|
|
|
|
// },
|
|
|
|
|
// searchPath: ['public'],
|
|
|
|
|
// },
|
|
|
|
|
// inflection_column: 'camelize',
|
|
|
|
|
// inflection_table: 'camelize',
|
|
|
|
|
// },
|
|
|
|
|
// ],
|
|
|
|
|
// external: true,
|
|
|
|
|
// };
|
|
|
|
|
|
|
|
|
|
const extMysqlProject = { |
|
|
|
|
title: 'externalREST', |
|
|
|
@ -47,7 +47,7 @@ const extMysqlProject = {
|
|
|
|
|
|
|
|
|
|
const createProjects = async (token) => { |
|
|
|
|
return await Promise.all( |
|
|
|
|
[extPgProject, extMysqlProject].map(async (projectAttr) => { |
|
|
|
|
[extMysqlProject].map(async (projectAttr) => { |
|
|
|
|
const response = await axios.post( |
|
|
|
|
'http://localhost:8080/api/v1/db/meta/projects/', |
|
|
|
|
projectAttr, |
|
|
|
|