Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 817f736

Browse files
authored
Merge pull request anuraghazra#61 from JounQin/patch-1
chore: remove redundant codes
2 parents 987fb0c + 95f1233 commit 817f736

File tree

1 file changed

+5
-11
lines changed

1 file changed

+5
-11
lines changed

src/utils.js

+5-11
Original file line numberDiff line numberDiff line change
@@ -48,17 +48,11 @@ function fallbackColor(color, fallbackColor) {
4848
}
4949

5050
function request(data, headers) {
51-
return new Promise((resolve, reject) => {
52-
axios({
53-
url: "https://api.github.com/graphql",
54-
method: "post",
55-
headers: {
56-
...headers,
57-
},
58-
data,
59-
})
60-
.then((response) => resolve(response))
61-
.catch((error) => reject(error));
51+
return axios({
52+
url: "https://api.github.com/graphql",
53+
method: "post",
54+
headers,
55+
data,
6256
});
6357
}
6458

0 commit comments

Comments
 (0)