Skip to content

Commit 967fc2f

Browse files
committed
fix :thumbup:
1 parent 4637289 commit 967fc2f

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

util/invite-user.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,14 @@ async function inviteGuestToSlack({ email, channels, _customMessage }) {
3434
channels: channels.join(','),
3535
})
3636

37-
return fetch(`https://slack.com/api/users.admin.inviteBulk`, {
37+
38+
const res = await fetch(`https://slack.com/api/users.admin.inviteBulk`, {
3839
headers,
3940
method: 'POST',
4041
body: data,
41-
}).then((r) => {
42-
console.log(r)
43-
metrics.increment('events.flow.invitetoslack', 1)
44-
r.json()
4542
})
43+
metrics.increment('events.flow.invitetoslack', 1)
44+
return await res.json()
4645
}
4746

4847

0 commit comments

Comments
 (0)