Fix some issues with Zulip

This commit is contained in:
Jan Oberhauser 2020-05-31 11:15:45 +02:00
parent e320ace9a0
commit 606a5fa98f
3 changed files with 11 additions and 57 deletions

View file

@ -33,11 +33,11 @@ export const streamOperations = [
value: 'getSubscribed', value: 'getSubscribed',
description: 'Get subscribed streams.', description: 'Get subscribed streams.',
}, },
// { {
// name: 'Update', name: 'Update',
// value: 'update', value: 'update',
// description: 'Update a stream.', description: 'Update a stream.',
// }, },
], ],
default: 'create', default: 'create',
description: 'The operation to perform.', description: 'The operation to perform.',
@ -48,51 +48,6 @@ export const streamFields = [
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
/* stream:create */ /* stream:create */
/* -------------------------------------------------------------------------- */ /* -------------------------------------------------------------------------- */
{
displayName: 'Subscriptions',
name: 'subscriptions',
type: 'fixedCollection',
required: true,
default: '',
description: 'A list of dictionaries containing the the key name and value specifying the name of the stream to subscribe. If the stream does not exist a new stream is created.',
displayOptions: {
show: {
resource: [
'stream',
],
operation: [
'create',
],
},
},
typeOptions: {
multipleValues: true,
},
options: [
{
displayName: 'Subscription Properties',
name: 'properties',
values: [
{
displayName: 'Name',
name: 'name',
type: 'string',
required: true,
default: '',
description: 'Name of Subscription.',
},
{
displayName: 'Description',
name: 'description',
type: 'string',
required: true,
default: '',
description: 'Description of Subscription.',
}
],
},
],
},
{ {
displayName: 'JSON Parameters', displayName: 'JSON Parameters',
name: 'jsonParameters', name: 'jsonParameters',

View file

@ -33,11 +33,11 @@ export const userOperations = [
value: 'getAll', value: 'getAll',
description: 'Get all users.', description: 'Get all users.',
}, },
// { {
// name: 'Update', name: 'Update',
// value: 'update', value: 'update',
// description: 'Update a user.', description: 'Update a user.',
// }, },
], ],
default: 'create', default: 'create',
description: 'The operation to perform.', description: 'The operation to perform.',

View file

@ -263,9 +263,8 @@ export class Zulip implements INodeType {
if (operation === 'create') { if (operation === 'create') {
const jsonParameters = this.getNodeParameter('jsonParameters', i) as boolean; const jsonParameters = this.getNodeParameter('jsonParameters', i) as boolean;
const subscriptions = this.getNodeParameter('subscriptions', i) as IDataObject[]; const subscriptions = this.getNodeParameter('subscriptions', i) as IDataObject;
//@ts-ignore
body.subscriptions = JSON.stringify(subscriptions.properties); body.subscriptions = JSON.stringify(subscriptions.properties);
if (jsonParameters) { if (jsonParameters) {