feat: restrict public API creation methods to CLI and API

This commit is contained in:
Santosh Bhandari 2026-05-14 10:05:46 +05:45
parent aa0c16b648
commit e63d6d2cf2

View file

@ -188,11 +188,11 @@ export class PublicIntegrationsController {
);
}
const allowedCreationMethods = ['WEB', 'CLI'] as const;
const allowedCreationMethods = ['CLI', 'API'] as const;
const creationMethod = allowedCreationMethods.includes(
rawBody.creationMethod
)
? (rawBody.creationMethod as 'WEB' | 'CLI')
? (rawBody.creationMethod as 'CLI' | 'API')
: 'API';
console.log(JSON.stringify(body, null, 2));