mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
✨ Addi an optional database field to redis (#2634)
This commit is contained in:
@@ -30,5 +30,11 @@ export class Redis implements ICredentialType {
|
|||||||
type: 'number',
|
type: 'number',
|
||||||
default: 6379,
|
default: 6379,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
displayName: 'Database',
|
||||||
|
name: 'database',
|
||||||
|
type: 'number',
|
||||||
|
default: 0,
|
||||||
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -507,6 +507,7 @@ export class Redis implements INodeType {
|
|||||||
});
|
});
|
||||||
|
|
||||||
client.on('ready', async (err: Error | null) => {
|
client.on('ready', async (err: Error | null) => {
|
||||||
|
client.select(credentials.database as number);
|
||||||
try {
|
try {
|
||||||
if (operation === 'info') {
|
if (operation === 'info') {
|
||||||
const clientInfo = util.promisify(client.info).bind(client);
|
const clientInfo = util.promisify(client.info).bind(client);
|
||||||
|
|||||||
Reference in New Issue
Block a user