Skip to content

Commit

Permalink
DOP-4549 added logs, return later
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Apr 30, 2024
1 parent 5e0940c commit 10d9716
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions api/controllers/v1/slack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,15 +197,16 @@ export const DeployRepo = async (event: any = {}): Promise<any> => {
const docsetsRepository = new DocsetsRepository(db, c, consoleLogger);
const jobRepository = new JobRepository(db, c, consoleLogger);

return {
statusCode: 200,
headers: { 'Content-Type': 'application/json' },
};

// This is coming in as urlencoded string, need to decode before parsing
const decoded = decodeURIComponent(event.body).split('=')[1];
const parsed = JSON.parse(decoded);
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') {
Expand Down

0 comments on commit 10d9716

Please sign in to comment.