File tree 3 files changed +16
-15
lines changed
3 files changed +16
-15
lines changed Original file line number Diff line number Diff line change 110
110
</template >
111
111
112
112
<script setup>
113
- const SINGULARITY_DEMO_SIGNUPS_TOKEN = import .meta.env.VITE_AIRTABLE_SINGULARITY_DEMO_TOKEN
113
+ const config = useRuntimeConfig ()
114
114
const buttonStore = useZeroButtonStore ()
115
115
// ======================================================================= Props
116
116
const props = defineProps ({
@@ -220,7 +220,7 @@ const submitForm = async () => {
220
220
}
221
221
const headers = {
222
222
' Content-Type' : ' application/json' ,
223
- ' Authorization' : ` Bearer ${ SINGULARITY_DEMO_SIGNUPS_TOKEN } `
223
+ ' Authorization' : ` Bearer ${ config . public . airtableToken } `
224
224
}
225
225
const res = await $fetch (' https://api.airtable.com/v0/apphbQmrNLNNXiaqG/tblDUSr66nczukX9Y' , {
226
226
method: ' POST' ,
Original file line number Diff line number Diff line change 42
42
</template >
43
43
44
44
<script setup>
45
- const SINGULARITY_DEMO_SIGNUPS_TOKEN = import .meta.env.VITE_AIRTABLE_SINGULARITY_DEMO_TOKEN
45
+ const config = useRuntimeConfig ()
46
46
const buttonStore = useZeroButtonStore ()
47
47
// ======================================================================= Props
48
48
const props = defineProps ({
@@ -93,18 +93,18 @@ const submitForm = async () => {
93
93
if (formSubmitted .value ) { return }
94
94
if (field .value ) {
95
95
const body = {
96
- records: [
97
- {
98
- fields: {
99
- email: field .value
100
- }
96
+ records: [
97
+ {
98
+ fields: {
99
+ email: field .value
101
100
}
102
- ]
103
- }
104
- const headers = {
105
- ' Content-Type' : ' application/json' ,
106
- ' Authorization' : ` Bearer ${ SINGULARITY_DEMO_SIGNUPS_TOKEN } `
107
- }
101
+ }
102
+ ]
103
+ }
104
+ const headers = {
105
+ ' Content-Type' : ' application/json' ,
106
+ ' Authorization' : ` Bearer ${ config .public .airtableToken } `
107
+ }
108
108
const res = await $fetch (' https://api.airtable.com/v0/apphbQmrNLNNXiaqG/tblSB1NYasWQIDGlp' , {
109
109
method: ' POST' ,
110
110
body,
Original file line number Diff line number Diff line change @@ -26,7 +26,8 @@ export default defineNuxtConfig({
26
26
serverFlag : env ,
27
27
seo : {
28
28
siteName : seo . siteName
29
- }
29
+ } ,
30
+ airtableToken : process . env . AIRTABLE_SINGULARITY_ACCESS_TOKEN
30
31
}
31
32
} ,
32
33
// ////////////////////////////////////////////////////////// Server & Bundler
You can’t perform that action at this time.
0 commit comments