mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
⚡ Add "Date Fields" parameter to the insert & update operations
MongoDB
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
import { INodeTypeDescription } from 'n8n-workflow';
|
||||
import {
|
||||
INodeTypeDescription,
|
||||
} from 'n8n-workflow';
|
||||
|
||||
/**
|
||||
* Options to be displayed
|
||||
@@ -6,7 +8,7 @@ import { INodeTypeDescription } from 'n8n-workflow';
|
||||
export const nodeDescription: INodeTypeDescription = {
|
||||
displayName: 'MongoDB',
|
||||
name: 'mongoDb',
|
||||
icon: 'file:mongoDb.png',
|
||||
icon: 'file:mongoDb.svg',
|
||||
group: ['input'],
|
||||
version: 1,
|
||||
description: 'Find, insert and update documents in MongoDB.',
|
||||
@@ -46,7 +48,7 @@ export const nodeDescription: INodeTypeDescription = {
|
||||
{
|
||||
name: 'Update',
|
||||
value: 'update',
|
||||
description: 'Updates documents.',
|
||||
description: 'Update documents.',
|
||||
},
|
||||
],
|
||||
default: 'find',
|
||||
@@ -97,7 +99,9 @@ export const nodeDescription: INodeTypeDescription = {
|
||||
},
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['find'],
|
||||
operation: [
|
||||
'find',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: '{}',
|
||||
@@ -115,7 +119,9 @@ export const nodeDescription: INodeTypeDescription = {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['insert'],
|
||||
operation: [
|
||||
'insert',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -133,7 +139,9 @@ export const nodeDescription: INodeTypeDescription = {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['update'],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: 'id',
|
||||
@@ -147,7 +155,9 @@ export const nodeDescription: INodeTypeDescription = {
|
||||
type: 'string',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: ['update'],
|
||||
operation: [
|
||||
'update',
|
||||
],
|
||||
},
|
||||
},
|
||||
default: '',
|
||||
@@ -155,5 +165,29 @@ export const nodeDescription: INodeTypeDescription = {
|
||||
description:
|
||||
'Comma separated list of the fields to be included into the new document.',
|
||||
},
|
||||
{
|
||||
displayName: 'Options',
|
||||
name: 'options',
|
||||
type: 'collection',
|
||||
displayOptions: {
|
||||
show: {
|
||||
operation: [
|
||||
'update',
|
||||
'insert',
|
||||
],
|
||||
},
|
||||
},
|
||||
placeholder: 'Add Option',
|
||||
default: {},
|
||||
options: [
|
||||
{
|
||||
displayName: 'Date Fields',
|
||||
name: 'dateFields',
|
||||
type: 'string',
|
||||
default: '',
|
||||
description: 'Comma separeted list of fields that will be parse as Mongo Date type.',
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user