aboutsummaryrefslogtreecommitdiff
path: root/src/constants.ts
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2021-06-29 17:54:50 -0500
committermat <github@matdoes.dev>2021-06-29 17:54:50 -0500
commit49ff24343e1c964b6cb82fdf76957ffd2f27d049 (patch)
tree820a3668e21dffc7eefa53630944412d9d97a129 /src/constants.ts
parent758ca15277daa11ce1ec86ce7f07ea7beee9eb8f (diff)
parentc0c534dafb54ebf9f95a5054f576ad99de29f232 (diff)
downloadskyblock-api-49ff24343e1c964b6cb82fdf76957ffd2f27d049.tar.gz
skyblock-api-49ff24343e1c964b6cb82fdf76957ffd2f27d049.tar.bz2
skyblock-api-49ff24343e1c964b6cb82fdf76957ffd2f27d049.zip
Merge branch 'main' of https://github.com/skyblockstats/skyblock-api into main
Diffstat (limited to 'src/constants.ts')
-rw-r--r--src/constants.ts4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/constants.ts b/src/constants.ts
index 9699e57..dcb9acf 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -40,7 +40,7 @@ async function fetchGithubApi(method: string, route: string, headers?: any, json
githubApiBase + route,
{
agent: () => httpsAgent,
- body: json ? JSON.stringify(json) : null,
+ body: json ? JSON.stringify(json) : undefined,
method,
headers: Object.assign({
'Authorization': `token ${process.env.github_token}`
@@ -78,7 +78,7 @@ function fetchFile(path: string): Promise<GithubFile> {
return new Promise(resolve => {
queue.enqueue(async() => {
if (fileCache.has(path))
- return resolve(fileCache.get(path))
+ return resolve(fileCache.get(path)!)
const r = await fetchGithubApi(
'GET',