feat: restrict public API creation methods to CLI and API
This commit is contained in:
parent
aa0c16b648
commit
e63d6d2cf2
1 changed files with 2 additions and 2 deletions
|
|
@ -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));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue