Compare commits
	
		
			3 commits
		
	
	
		
			99addde632
			...
			ee8c3f4a3e
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| ee8c3f4a3e | |||
| a5a5a1ba04 | |||
| 48a12ba8cd | 
					 2 changed files with 1 additions and 27 deletions
				
			
		| 
						 | 
				
			
			@ -826,26 +826,6 @@ export class Plutio implements INodeType {
 | 
			
		|||
					}
 | 
			
		||||
				}
 | 
			
		||||
				if ('project' === resource) {
 | 
			
		||||
					if ('getCklph' === operation) {
 | 
			
		||||
						const contributor = this.getNodeParameter('contributor', i) as IDataObject;
 | 
			
		||||
 | 
			
		||||
						if (contributor) {
 | 
			
		||||
							let contributorId;
 | 
			
		||||
							const users = await plutioApiRequest.call(this, 'GET', '/people');
 | 
			
		||||
							for (const user of users) {
 | 
			
		||||
								if (user.contactEmails[0].address === contributor || contributor === user._id) {
 | 
			
		||||
									contributorId = user._id;
 | 
			
		||||
								}
 | 
			
		||||
							}
 | 
			
		||||
							qs.contributors = contributorId as string;
 | 
			
		||||
						}
 | 
			
		||||
						const project = await plutioApiRequest.call(this, 'GET', '/projects', {}, qs);
 | 
			
		||||
						if (project.length === 1) {
 | 
			
		||||
							responseData = project;
 | 
			
		||||
						} else {
 | 
			
		||||
							responseData = {'name': 'default'};
 | 
			
		||||
						}
 | 
			
		||||
					}
 | 
			
		||||
					if ('get' === operation) {
 | 
			
		||||
						const options = this.getNodeParameter('options', i) as IDataObject;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -17,12 +17,6 @@ export const projectOperations: INodeProperties[] = [
 | 
			
		|||
			},
 | 
			
		||||
		},
 | 
			
		||||
		options: [
 | 
			
		||||
			// {
 | 
			
		||||
			// 	name: 'Chykalophia',
 | 
			
		||||
			// 	value: 'getCklph',
 | 
			
		||||
			// 	description: 'Get projects by contributor\'s email for CKLPH',
 | 
			
		||||
			// 	action: 'Get a project',
 | 
			
		||||
			// },
 | 
			
		||||
			{
 | 
			
		||||
				name: 'Copy',
 | 
			
		||||
				value: 'copy',
 | 
			
		||||
| 
						 | 
				
			
			@ -60,7 +54,7 @@ export const projectOperations: INodeProperties[] = [
 | 
			
		|||
				action: 'Update a project',
 | 
			
		||||
			},
 | 
			
		||||
		],
 | 
			
		||||
		default: 'getCklph',
 | 
			
		||||
		default: 'get',
 | 
			
		||||
	},
 | 
			
		||||
];
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue