Merge pull request #61 from JounQin/patch-1
chore: remove redundant codes
This commit is contained in:
commit
817f736b4e
1 changed files with 5 additions and 11 deletions
10
src/utils.js
10
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,
|
||||||
...headers,
|
|
||||||
},
|
|
||||||
data,
|
data,
|
||||||
})
|
|
||||||
.then((response) => resolve(response))
|
|
||||||
.catch((error) => reject(error));
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue