mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 01:56:46 +00:00
fix: Allow saved credenitals types of up to 64 characters instead of 32 (#13985)
This commit is contained in:
@@ -34,6 +34,17 @@ describe('CreateCredentialDto', () => {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'longer type',
|
||||
request: {
|
||||
name: 'LinkedIn Community Management OAuth2 API',
|
||||
type: 'linkedInCommunityManagementOAuth2Api',
|
||||
data: {
|
||||
clientId: '123',
|
||||
clientSecret: 'secret',
|
||||
},
|
||||
},
|
||||
},
|
||||
])('should validate $name', ({ request }) => {
|
||||
const result = CreateCredentialDto.safeParse(request);
|
||||
expect(result.success).toBe(true);
|
||||
@@ -110,7 +121,7 @@ describe('CreateCredentialDto', () => {
|
||||
name: 'type too long',
|
||||
request: {
|
||||
name: 'My API Credentials',
|
||||
type: 'a'.repeat(33),
|
||||
type: 'a'.repeat(129),
|
||||
data: {},
|
||||
},
|
||||
expectedErrorPath: ['type'],
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Z } from 'zod-class';
|
||||
|
||||
export class CreateCredentialDto extends Z.class({
|
||||
name: z.string().min(1).max(128),
|
||||
type: z.string().min(1).max(32),
|
||||
type: z.string().min(1).max(128),
|
||||
data: z.record(z.string(), z.unknown()),
|
||||
projectId: z.string().optional(),
|
||||
}) {}
|
||||
|
||||
Reference in New Issue
Block a user