mirror of
https://github.com/n8n-io/n8n.git
synced 2026-09-21 12:51:16 +08:00
fix(core): Use correct Gmail OAuth2 credential type in eval credential seeder (no-changelog) (#33825)
This commit is contained in:
@@ -123,7 +123,7 @@ of mocked) set the type's `EVAL_*` env var — e.g. `EVAL_SLACK_ACCESS_TOKEN`,
|
||||
Only a closed set of types is valid — declaring anything else fails at case-load
|
||||
with a pointer to add a template. From
|
||||
[`credentials/seeder.ts`](../../../packages/@n8n/instance-ai/evaluations/credentials/seeder.ts):
|
||||
`slackApi`, `notionApi`, `githubApi`, `gmailOAuth2Api`,
|
||||
`slackApi`, `notionApi`, `githubApi`, `gmailOAuth2`,
|
||||
`microsoftTeamsOAuth2Api`, `whatsAppTriggerApi`, `httpHeaderAuth`,
|
||||
`httpBasicAuth`. Need another? Add a `CredentialTemplate` to `seeder.ts` (a
|
||||
`defaultName`, optional `envVar`, and `buildData(token)`); that extends
|
||||
|
||||
@@ -39,7 +39,7 @@ const CREDENTIAL_TEMPLATES: Record<string, CredentialTemplate> = {
|
||||
envVar: 'EVAL_GITHUB_ACCESS_TOKEN',
|
||||
buildData: (token) => ({ accessToken: token }),
|
||||
},
|
||||
gmailOAuth2Api: {
|
||||
gmailOAuth2: {
|
||||
defaultName: '[eval] Gmail',
|
||||
envVar: 'EVAL_GMAIL_ACCESS_TOKEN',
|
||||
buildData: (token) => ({ oauthTokenData: { access_token: token } }),
|
||||
|
||||
Reference in New Issue
Block a user