We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cd890bb commit f2d8811Copy full SHA for f2d8811
2 files changed
src/routes/api/create-issue.ts
@@ -24,7 +24,7 @@ export const post: RequestHandler = async ({ rawBody }) => {
24
headers: {
25
Authorization: `Basic ${Buffer.from(
26
`Nick-Mazuk:${import.meta.env.VITE_GITHUB_ACCESS_TOKEN}`
27
- ).toString('base64url')}`,
+ ).toString('base64')}`,
28
accept: 'application/vnd.github.v3+json',
29
},
30
body: JSON.stringify({
src/routes/help/issue.svelte
@@ -25,11 +25,12 @@
method: 'post',
body: JSON.stringify(data),
})
- const json = await response.json()
+ if (response.status !== 200) return false
+ const json = await response.json()
31
if (typeof json.url === 'string') issueUrl = json.url
32
- return response.status === 200
33
+ return true
34
}
35
</script>
36
0 commit comments