Skip to content

Commit

Permalink
Fixing test case - changing the return type to Promise<void>
Browse files Browse the repository at this point in the history
  • Loading branch information
vikhyat187 committed Oct 29, 2024
1 parent fddc63a commit 2bc33d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/awsAccess.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export async function processAWSAccessRequest(
awsGroupId: string,
env: env,
channelId: number
) {
) : Promise<void> {
const authToken = await jwt.sign(
{ name: "Cloudflare Worker", exp: Math.floor(Date.now() / 1000) + 2 },
env.BOT_PRIVATE_KEY,
Expand Down Expand Up @@ -42,7 +42,7 @@ export async function processAWSAccessRequest(
} else {
content = `AWS access granted successfully <@${discordUserId}>! Please head over to AWS - ${AWS_IAM_SIGNIN_URL}.`;
}
return fetch(`${DISCORD_BASE_URL}/channels/${channelId}/messages`, {
await fetch(`${DISCORD_BASE_URL}/channels/${channelId}/messages`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand All @@ -54,7 +54,7 @@ export async function processAWSAccessRequest(
});
} catch (err) {
const content = `<@${discordUserId}> Error occurred while granting AWS access.`;
return fetch(`${DISCORD_BASE_URL}/channels/${channelId}/messages`, {
await fetch(`${DISCORD_BASE_URL}/channels/${channelId}/messages`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down

0 comments on commit 2bc33d0

Please sign in to comment.