Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
public constructor(scope: App, id: string, props?: StackProps) {
super(scope, id, props);
const api = new RestApi(this, 'Endpoint');
api.root.addMethod('POST');
const accessToken = process.env.ACCESS_TOKEN as string;
const spaceId = process.env.SPACE_ID as string;
const topics = ['Entry.create'];
new ContentfulWebhook(this, 'ContentfulWebhook', {
accessToken,
spaceId,
name: 'ExampleWebhook',
url: api.url,
topics,
logLevel: 'debug',
});
}
}