feat: also send credentials when returning workflow via API (#4458) (no-changelog)
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
/* eslint-disable import/no-cycle */
|
||||
/* eslint-disable no-param-reassign */
|
||||
import { DeleteResult, EntityManager, In, Not } from 'typeorm';
|
||||
import { Db } from '..';
|
||||
import { DeleteResult, EntityManager, FindManyOptions, In, Not } from 'typeorm';
|
||||
import { Db, ICredentialsDb } from '..';
|
||||
import { RoleService } from '../role/role.service';
|
||||
import { CredentialsService } from './credentials.service';
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import {
|
||||
INodeCredentialTestResult,
|
||||
LoggerProxy,
|
||||
} from 'n8n-workflow';
|
||||
import { FindOneOptions, In } from 'typeorm';
|
||||
import { FindManyOptions, FindOneOptions, In } from 'typeorm';
|
||||
|
||||
import {
|
||||
createCredentialsFromCredentialsEntity,
|
||||
@@ -71,6 +71,10 @@ export class CredentialsService {
|
||||
});
|
||||
}
|
||||
|
||||
static async getMany(filter: FindManyOptions<ICredentialsDb>): Promise<ICredentialsDb[]> {
|
||||
return Db.collections.Credentials.find(filter);
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieve the sharing that matches a user and a credential.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user