File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export async function processAWSAccessRequest(
9
9
awsGroupId : string ,
10
10
env : env ,
11
11
channelId : number
12
- ) {
12
+ ) : Promise < void > {
13
13
const authToken = await jwt . sign (
14
14
{ name : "Cloudflare Worker" , exp : Math . floor ( Date . now ( ) / 1000 ) + 2 } ,
15
15
env . BOT_PRIVATE_KEY ,
@@ -42,7 +42,7 @@ export async function processAWSAccessRequest(
42
42
} else {
43
43
content = `AWS access granted successfully <@${ discordUserId } >! Please head over to AWS - ${ AWS_IAM_SIGNIN_URL } .` ;
44
44
}
45
- return fetch ( `${ DISCORD_BASE_URL } /channels/${ channelId } /messages` , {
45
+ await fetch ( `${ DISCORD_BASE_URL } /channels/${ channelId } /messages` , {
46
46
method : "POST" ,
47
47
headers : {
48
48
"Content-Type" : "application/json" ,
@@ -54,7 +54,7 @@ export async function processAWSAccessRequest(
54
54
} ) ;
55
55
} catch ( err ) {
56
56
const content = `<@${ discordUserId } > Error occurred while granting AWS access.` ;
57
- return fetch ( `${ DISCORD_BASE_URL } /channels/${ channelId } /messages` , {
57
+ await fetch ( `${ DISCORD_BASE_URL } /channels/${ channelId } /messages` , {
58
58
method : "POST" ,
59
59
headers : {
60
60
"Content-Type" : "application/json" ,
You can’t perform that action at this time.
0 commit comments