mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-10 14:44:05 -08:00
🔀 Merge branch 'master' of https://github.com/krasaee/n8n into krasaee-master
This commit is contained in:
commit
fb55e5ab29
|
@ -35,6 +35,19 @@ export class Postgres implements ICredentialType {
|
||||||
},
|
},
|
||||||
default: '',
|
default: '',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'SSL',
|
||||||
|
name: 'ssl',
|
||||||
|
type: 'options' as NodePropertyTypes,
|
||||||
|
options: [
|
||||||
|
{ name: 'disable', value: 'disable' },
|
||||||
|
{ name: 'allow', value: 'allow' },
|
||||||
|
{ name: 'require', value: 'require' },
|
||||||
|
{ name: 'verify', value: 'verify (not implemented)' },
|
||||||
|
{ name: 'verify-full', value: 'verify-full (not implemented)' }
|
||||||
|
],
|
||||||
|
default: 'disable',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
displayName: 'Port',
|
displayName: 'Port',
|
||||||
name: 'port',
|
name: 'port',
|
||||||
|
|
|
@ -202,7 +202,19 @@ export class Postgres implements INodeType {
|
||||||
|
|
||||||
const pgp = pgPromise();
|
const pgp = pgPromise();
|
||||||
|
|
||||||
const db = pgp(`postgres://${credentials.user}:${credentials.password}@${credentials.host}:${credentials.port}/${credentials.database}`);
|
const config = {
|
||||||
|
host: credentials.host as string,
|
||||||
|
port: credentials.port as number,
|
||||||
|
database: credentials.database as string,
|
||||||
|
user: credentials.user as string,
|
||||||
|
password: credentials.password as string,
|
||||||
|
ssl: credentials.ssl != 'disable',
|
||||||
|
sslmode: credentials.ssl as string
|
||||||
|
};
|
||||||
|
|
||||||
|
const db = pgp(config);
|
||||||
|
|
||||||
|
//const db = pgp(`postgres://${credentials.user}:${credentials.password}@${credentials.host}:${credentials.port}/${credentials.database}`);
|
||||||
|
|
||||||
let returnItems = [];
|
let returnItems = [];
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue