mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
refactor(core): Allow custom types on getCredentials (no-changelog) (#10567)
This commit is contained in:
committed by
GitHub
parent
52c574d83f
commit
be52176585
@@ -111,7 +111,7 @@ export class Baserow implements INodeType {
|
||||
methods = {
|
||||
loadOptions: {
|
||||
async getDatabaseIds(this: ILoadOptionsFunctions) {
|
||||
const credentials = (await this.getCredentials('baserowApi')) as BaserowCredentials;
|
||||
const credentials = await this.getCredentials<BaserowCredentials>('baserowApi');
|
||||
const jwtToken = await getJwtToken.call(this, credentials);
|
||||
const endpoint = '/api/applications/';
|
||||
const databases = (await baserowApiRequest.call(
|
||||
@@ -124,7 +124,7 @@ export class Baserow implements INodeType {
|
||||
},
|
||||
|
||||
async getTableIds(this: ILoadOptionsFunctions) {
|
||||
const credentials = (await this.getCredentials('baserowApi')) as BaserowCredentials;
|
||||
const credentials = await this.getCredentials<BaserowCredentials>('baserowApi');
|
||||
const jwtToken = await getJwtToken.call(this, credentials);
|
||||
const databaseId = this.getNodeParameter('databaseId', 0) as string;
|
||||
const endpoint = `/api/database/tables/database/${databaseId}/`;
|
||||
@@ -138,7 +138,7 @@ export class Baserow implements INodeType {
|
||||
},
|
||||
|
||||
async getTableFields(this: ILoadOptionsFunctions) {
|
||||
const credentials = (await this.getCredentials('baserowApi')) as BaserowCredentials;
|
||||
const credentials = await this.getCredentials<BaserowCredentials>('baserowApi');
|
||||
const jwtToken = await getJwtToken.call(this, credentials);
|
||||
const tableId = this.getNodeParameter('tableId', 0) as string;
|
||||
const endpoint = `/api/database/fields/table/${tableId}/`;
|
||||
@@ -160,7 +160,7 @@ export class Baserow implements INodeType {
|
||||
const operation = this.getNodeParameter('operation', 0) as Operation;
|
||||
|
||||
const tableId = this.getNodeParameter('tableId', 0) as string;
|
||||
const credentials = (await this.getCredentials('baserowApi')) as BaserowCredentials;
|
||||
const credentials = await this.getCredentials<BaserowCredentials>('baserowApi');
|
||||
const jwtToken = await getJwtToken.call(this, credentials);
|
||||
const fields = await mapper.getTableFields.call(this, tableId, jwtToken);
|
||||
mapper.createMappings(fields);
|
||||
|
||||
Reference in New Issue
Block a user