diff --git a/.env.example b/.env.example new file mode 100644 index 0000000..1994013 --- /dev/null +++ b/.env.example @@ -0,0 +1,2 @@ +API_URL="http://localhost:4000" +API_TOKEN="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \ No newline at end of file diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 6118593..2842b7f 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -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()