Skip to content

Commit

Permalink
fix: Add examples .env.test
Browse files Browse the repository at this point in the history
  • Loading branch information
richtera committed Jan 30, 2024
1 parent d964992 commit 00d25d7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .env.test.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
TEST_PINATAAPIKEY=
TEST_PINATASECRETAPIKEY=
TEST_PINATAJWTKEY=
TEST_INFURA_API_KEY_NAME=
TEST_INFURA_API_KEY=
TEST_INFURA_GATEWAY=
2 changes: 1 addition & 1 deletion examples/astro-example/src/pages/api-infura.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export async function POST({ request }: APIContext) {
{
headers: {
authorization: `Basic ${Buffer.from(
`${import.meta.env.TEST_INFURA_PROJECT}:${
`${import.meta.env.TEST_INFURA_API_KEY_NAME}:${
import.meta.env.TEST_INFURA_API_KEY
}`
).toString("base64")}`,
Expand Down
4 changes: 2 additions & 2 deletions examples/astro-example/src/pages/index.astro
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ import UploadVuePinata from '../components/UploadVuePinata.vue'
<ReactCard color="white" title="Upload to Infura" client:only="react">
<Upload client:only="react" gateway={import.meta.env.TEST_INFURA_GATEWAY} options={{
headers:{
authorization: `Basic ${Buffer.from(`${import.meta.env.TEST_INFURA_PROJECT}:${import.meta.env.TEST_INFURA_API_KEY}`).toString('base64')}`
authorization: `Basic ${Buffer.from(`${import.meta.env.TEST_INFURA_API_KEY_NAME}:${import.meta.env.TEST_INFURA_API_KEY}`).toString('base64')}`
}
}}/>
</ReactCard>
Expand All @@ -67,7 +67,7 @@ import UploadVuePinata from '../components/UploadVuePinata.vue'
<VueCard color="white" title="Upload to Infura" client:only="vue">
<UploadVue client:only="vue" gateway={import.meta.env.TEST_INFURA_GATEWAY} options={{
headers:{
authorization: `Basic ${Buffer.from(`${import.meta.env.TEST_INFURA_PROJECT}:${import.meta.env.TEST_INFURA_API_KEY}`).toString('base64')}`
authorization: `Basic ${Buffer.from(`${import.meta.env.TEST_INFURA_API_KEY_NAME}:${import.meta.env.TEST_INFURA_API_KEY}`).toString('base64')}`
}
}}/>
</VueCard>
Expand Down

0 comments on commit 00d25d7

Please sign in to comment.