aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-05-18 19:09:35 +0000
committermat <github@matdoes.dev>2022-05-18 19:09:35 +0000
commit789f5c06b8a77388c477cda4964d75382a86e1ef (patch)
tree7ba5caadd84a07d58e9a494bf33987e8a129d059 /src
parent691842702531e00e7ea0c2699271f048a385192f (diff)
downloadskyblock-api-789f5c06b8a77388c477cda4964d75382a86e1ef.tar.gz
skyblock-api-789f5c06b8a77388c477cda4964d75382a86e1ef.tar.bz2
skyblock-api-789f5c06b8a77388c477cda4964d75382a86e1ef.zip
fix lead
Diffstat (limited to 'src')
-rw-r--r--src/cleaners/skyblock/itemId.ts1
-rw-r--r--src/constants.ts2
2 files changed, 2 insertions, 1 deletions
diff --git a/src/cleaners/skyblock/itemId.ts b/src/cleaners/skyblock/itemId.ts
index 027a74b..f059233 100644
--- a/src/cleaners/skyblock/itemId.ts
+++ b/src/cleaners/skyblock/itemId.ts
@@ -110,6 +110,7 @@ const ITEMS = {
'grilled_pork': 'cooked_porkchop',
'glistering_melon': 'glistering_melon_slice',
'cactus_green': 'green_dye',
+ 'leash': 'lead',
'enchanted_lapis_lazuli': 'enchanted_lapis_lazuli',
'enchanted_potato': 'enchanted_potato',
diff --git a/src/constants.ts b/src/constants.ts
index a112c96..b8761b7 100644
--- a/src/constants.ts
+++ b/src/constants.ts
@@ -44,7 +44,7 @@ async function fetchGithubApi(method: string, route: string, headers?: any, json
body: json ? JSON.stringify(json) : undefined,
method,
headers: Object.assign({
- 'Authorization': `token ${process.env.github_token}`
+ 'Authorization': process.env.github_token ? `token ${process.env.github_token}` : undefined
}, headers),
}
)