Skip to content

Commit f2d8811

Browse files
committed
fix broken system for reporting bugs
1 parent cd890bb commit f2d8811

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/routes/api/create-issue.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export const post: RequestHandler = async ({ rawBody }) => {
2424
headers: {
2525
Authorization: `Basic ${Buffer.from(
2626
`Nick-Mazuk:${import.meta.env.VITE_GITHUB_ACCESS_TOKEN}`
27-
).toString('base64url')}`,
27+
).toString('base64')}`,
2828
accept: 'application/vnd.github.v3+json',
2929
},
3030
body: JSON.stringify({

src/routes/help/issue.svelte

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,12 @@
2525
method: 'post',
2626
body: JSON.stringify(data),
2727
})
28-
const json = await response.json()
28+
if (response.status !== 200) return false
2929
30+
const json = await response.json()
3031
if (typeof json.url === 'string') issueUrl = json.url
3132
32-
return response.status === 200
33+
return true
3334
}
3435
</script>
3536

0 commit comments

Comments
 (0)