Browse Source

on load of flights, write user to airtable

master
Spencer Flagg 3 years ago
parent
commit
4f4b5435e2
4 changed files with 21 additions and 2 deletions
  1. +1
    -1
      components/TheSideBar.vue
  2. +1
    -0
      login/index.js
  3. +1
    -1
      package.json
  4. +18
    -0
      pages/flights.vue

+ 1
- 1
components/TheSideBar.vue View File

@ -299,7 +299,7 @@
</li>
</ul>
<div class="company-footer">
&nbsp; FlyLocal v5.0.4.1 &nbsp;&nbsp;𐄙&nbsp;&nbsp; ©2021 FlyLocal,
&nbsp; FlyLocal v5.0.4.2 &nbsp;&nbsp;𐄙&nbsp;&nbsp; ©2021 FlyLocal,
Inc &nbsp;
</div>
</div>

+ 1
- 0
login/index.js View File

@ -269,6 +269,7 @@ app.post("/verify", formParser, (req, res) => {
</main>
${stylesheet}
`);
});
});

+ 1
- 1
package.json View File

@ -1,6 +1,6 @@
{
"name": "flylocal",
"version": "5.0.4.1",
"version": "5.0.4.2",
"private": true,
"scripts": {
"dev": "nuxt",

+ 18
- 0
pages/flights.vue View File

@ -382,6 +382,24 @@ export default {
this.$segment.identify(emailCookie, {
email: emailCookie
});
const newUser =
{
fields: {
Email: emailCookie,
CreatedDate: new Date(),
Type: 'portier-login',
Site: 'https://iflylocal.com/'
}
}
const res = await fetch(`https://api.airtable.com/v0/appiQwfVZixRgRICe/User/`, {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: 'Bearer keyJ2ht64ZSN57AG1'
},
body: JSON.stringify(newUser)
})
}
},
created () {

Loading…
Cancel
Save