Skip to content

Commit

Permalink
feat/slack use QS string for deploying repos
Browse files Browse the repository at this point in the history
  • Loading branch information
anabellabuckvar committed Nov 11, 2024
1 parent 311970d commit c2f3ab7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions slack/src/functions/deploy-repos.mts
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import axios from 'axios';
import { getQSString } from '../process-slack-req.js';

export default async (req: Request) => {
if (!req?.body) {
return new Response('Request received without a body', { status: 401 });
}

const slackPayload = await new Response(req.body).text();
const key_val = getQSString(slackPayload);
console.log(`key_val: ${key_val}`);

// This is coming in as urlencoded string, need to decode before parsing
const decoded = decodeURIComponent(slackPayload).split('=')[1];
Expand Down

0 comments on commit c2f3ab7

Please sign in to comment.