Refactor reource names to match endpoint

This commit is contained in:
trojanh
2020-01-31 19:13:40 +05:30
parent 9ff78410ef
commit 1759f6ce98
9 changed files with 97 additions and 169 deletions

View File

@@ -1,5 +1,7 @@
import { INodeProperties } from "n8n-workflow";
const resource = [ 'invoices' ];
export const expenseOperations = [
{
displayName: 'Operation',
@@ -7,9 +9,7 @@ export const expenseOperations = [
type: 'options',
displayOptions: {
show: {
resource: [
'expense',
],
resource,
},
},
options: [
@@ -47,9 +47,7 @@ export const expenseFields = [
type: 'boolean',
displayOptions: {
show: {
resource: [
'expense',
],
resource,
operation: [
'getAll',
],
@@ -64,9 +62,7 @@ export const expenseFields = [
type: 'number',
displayOptions: {
show: {
resource: [
'expense',
],
resource,
operation: [
'getAll',
],
@@ -90,9 +86,7 @@ export const expenseFields = [
default: {},
displayOptions: {
show: {
resource: [
'expense',
],
resource,
operation: [
'getAll',
],
@@ -175,9 +169,7 @@ export const expenseFields = [
operation: [
'get',
],
resource: [
'expense',
],
resource,
},
},
description: 'The ID of the expense you are retrieving.',
@@ -197,9 +189,7 @@ export const expenseFields = [
operation: [
'delete',
],
resource: [
'expense',
],
resource,
},
},
description: 'The ID of the expense you want to delete.',