mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
refactor(core): Allow custom types on getCredentials (no-changelog) (#10567)
This commit is contained in:
committed by
GitHub
parent
52c574d83f
commit
be52176585
@@ -143,9 +143,9 @@ export async function handleGetAll(
|
||||
}
|
||||
|
||||
export async function loadWebinars(this: ILoadOptionsFunctions) {
|
||||
const { oauthTokenData } = (await this.getCredentials('goToWebinarOAuth2Api')) as {
|
||||
const { oauthTokenData } = await this.getCredentials<{
|
||||
oauthTokenData: { account_key: string };
|
||||
};
|
||||
}>('goToWebinarOAuth2Api');
|
||||
|
||||
const endpoint = `accounts/${oauthTokenData.account_key}/webinars`;
|
||||
|
||||
@@ -176,9 +176,9 @@ export async function loadWebinars(this: ILoadOptionsFunctions) {
|
||||
}
|
||||
|
||||
export async function loadWebinarSessions(this: ILoadOptionsFunctions) {
|
||||
const { oauthTokenData } = (await this.getCredentials('goToWebinarOAuth2Api')) as {
|
||||
const { oauthTokenData } = await this.getCredentials<{
|
||||
oauthTokenData: { organizer_key: string };
|
||||
};
|
||||
}>('goToWebinarOAuth2Api');
|
||||
|
||||
const webinarKey = this.getCurrentNodeParameter('webinarKey') as string;
|
||||
|
||||
@@ -208,9 +208,9 @@ export async function loadWebinarSessions(this: ILoadOptionsFunctions) {
|
||||
}
|
||||
|
||||
export async function loadRegistranSimpleQuestions(this: ILoadOptionsFunctions) {
|
||||
const { oauthTokenData } = (await this.getCredentials('goToWebinarOAuth2Api')) as {
|
||||
const { oauthTokenData } = await this.getCredentials<{
|
||||
oauthTokenData: { organizer_key: string };
|
||||
};
|
||||
}>('goToWebinarOAuth2Api');
|
||||
|
||||
const webinarkey = this.getNodeParameter('webinarKey') as string;
|
||||
|
||||
@@ -233,9 +233,9 @@ export async function loadRegistranSimpleQuestions(this: ILoadOptionsFunctions)
|
||||
}
|
||||
|
||||
export async function loadAnswers(this: ILoadOptionsFunctions) {
|
||||
const { oauthTokenData } = (await this.getCredentials('goToWebinarOAuth2Api')) as {
|
||||
const { oauthTokenData } = await this.getCredentials<{
|
||||
oauthTokenData: { organizer_key: string };
|
||||
};
|
||||
}>('goToWebinarOAuth2Api');
|
||||
|
||||
const webinarKey = this.getCurrentNodeParameter('webinarKey') as string;
|
||||
|
||||
@@ -262,9 +262,9 @@ export async function loadAnswers(this: ILoadOptionsFunctions) {
|
||||
}
|
||||
|
||||
export async function loadRegistranMultiChoiceQuestions(this: ILoadOptionsFunctions) {
|
||||
const { oauthTokenData } = (await this.getCredentials('goToWebinarOAuth2Api')) as {
|
||||
const { oauthTokenData } = await this.getCredentials<{
|
||||
oauthTokenData: { organizer_key: string };
|
||||
};
|
||||
}>('goToWebinarOAuth2Api');
|
||||
|
||||
const webinarkey = this.getNodeParameter('webinarKey') as string;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user