Skip to content

Commit

Permalink
feat: .env.example
Browse files Browse the repository at this point in the history
  • Loading branch information
barthofu committed Mar 7, 2023
1 parent 58b2bcc commit 1b46016
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
API_URL="http://localhost:4000"
API_TOKEN="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
2 changes: 1 addition & 1 deletion src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export const getStaticProps: GetStaticProps = async (ctx) => {
const apiUrl = process.env['API_URL']
const apiToken = process.env['API_TOKEN']

const infoRes = await fetch(new URL('/bot/info?logIgnore=true', apiUrl), { headers: { Authorization: `Bearer ${apiToken}` } })
const infoRes = await fetch(new URL('/bot/info?logIgnore=true', apiUrl), { headers: { 'Authorization': `Bearer ${apiToken}` } })
if (!infoRes.ok) throw new Error(infoRes.statusText)
const info = await infoRes.json()

Expand Down

0 comments on commit 1b46016

Please sign in to comment.