diff --git a/api/controllers/v1/slack.ts b/api/controllers/v1/slack.ts index 33e5aace8..f7bc53fe1 100644 --- a/api/controllers/v1/slack.ts +++ b/api/controllers/v1/slack.ts @@ -203,11 +203,6 @@ export const DeployRepo = async (event: any = {}): Promise => { const stateValues = parsed.view.state.values; console.log(JSON.stringify(stateValues)); - return { - statusCode: 200, - headers: { 'Content-Type': 'application/json' }, - }; - //TODO: create an interface for slack view_submission payloads if (parsed.type !== 'view_submission') { return prepResponse(200, 'text/plain', 'Form not submitted, will not process request'); @@ -220,6 +215,11 @@ export const DeployRepo = async (event: any = {}): Promise => { let values = []; const isAdmin = await repoEntitlementRepository.getIsAdmin(parsed.user.id); + + return { + statusCode: 200, + headers: { 'Content-Type': 'application/json' }, + }; try { values = await slackConnector.parseSelection(stateValues, isAdmin, repoBranchesRepository); } catch (e) {