Skip to content
This repository was archived by the owner on Feb 24, 2021. It is now read-only.

Commit 0c961f6

Browse files
committed
fix imports
1 parent 2392386 commit 0c961f6

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

packages/ooth-patreon/src/index.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import formurlencoded from 'form-urlencoded';
2-
import fetch from 'node-fetch';
1+
import formUrlencoded from 'form-urlencoded';
2+
import nodeFetch from 'node-fetch';
33
import { FullRequest, Ooth } from 'ooth';
44
import { callbackify } from 'util';
55

@@ -28,12 +28,12 @@ export default function({ name = 'patreon', ooth, clientID, clientSecret, redire
2828
callbackify(async (req: FullRequest) => {
2929
const code = req.body.code;
3030

31-
const tokenRes = await fetch(`https://www.patreon.com/api/oauth2/token`, {
31+
const tokenRes = await nodeFetch(`https://www.patreon.com/api/oauth2/token`, {
3232
method: 'POST',
3333
headers: {
3434
'Content-Type': 'application/x-www-form-urlencoded',
3535
},
36-
body: formurlencoded({
36+
body: formUrlencoded({
3737
code,
3838
grant_type: 'authorization_code',
3939
client_id: clientID,
@@ -45,7 +45,7 @@ export default function({ name = 'patreon', ooth, clientID, clientSecret, redire
4545

4646
const accessToken = tokenData.access_token;
4747
const refreshToken = tokenData.refresh_token;
48-
const userRes = await fetch(
48+
const userRes = await nodeFetch(
4949
`https://www.patreon.com/api/oauth2/v2/identity?${qs.stringify({
5050
include: 'memberships',
5151
fields: {

0 commit comments

Comments
 (0)