mirror of
https://github.com/Aviortheking/codestats-readme.git
synced 2025-06-07 16:29:57 +00:00
Merge pull request #61 from JounQin/patch-1
chore: remove redundant codes
This commit is contained in:
commit
817f736b4e
16
src/utils.js
16
src/utils.js
@ -48,17 +48,11 @@ function fallbackColor(color, fallbackColor) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function request(data, headers) {
|
function request(data, headers) {
|
||||||
return new Promise((resolve, reject) => {
|
return axios({
|
||||||
axios({
|
url: "https://api.github.com/graphql",
|
||||||
url: "https://api.github.com/graphql",
|
method: "post",
|
||||||
method: "post",
|
headers,
|
||||||
headers: {
|
data,
|
||||||
...headers,
|
|
||||||
},
|
|
||||||
data,
|
|
||||||
})
|
|
||||||
.then((response) => resolve(response))
|
|
||||||
.catch((error) => reject(error));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user