Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Desk booking + Vercel deployment
- Loading branch information
Showing
20 changed files
with
731 additions
and
900 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
REACT_APP_BACKEND_URL= | ||
REACT_APP_ARCHILOGIC_API_URL=https://api.archilogic.com | ||
ARCHILOGIC_API_URL=https://api.archilogic.com | ||
ARCHILOGIC_SECRET_KEY= | ||
|
||
REACT_APP_ARCHILOGIC_API_URL=$ARCHILOGIC_API_URL | ||
REACT_APP_PUBLISHABLE_TOKEN= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,3 +23,4 @@ | |
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
.vercel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import fetch from 'node-fetch' | ||
|
||
export default function handler(request, response) { | ||
const body = JSON.stringify({ | ||
scopes: [ | ||
{ resource: 'floor', action: 'readPrivate' }, | ||
{ resource: 'floor', action: 'queryPublic' }, | ||
{ resource: 'customFields', action: 'readPrivate' }, | ||
{ resource: 'customFields', action: 'readPublic' }, | ||
{ resource: 'customFields', action: 'write' } | ||
], | ||
durationSeconds: 3600 | ||
}) | ||
|
||
fetch(`${process.env.ARCHILOGIC_API_URL}/v2/temporary-access-token/create`, { | ||
headers: { | ||
'Content-Type': 'application/json', | ||
Authorization: `AL-Secret-Token ${process.env.ARCHILOGIC_SECRET_KEY}` | ||
}, | ||
body: body, | ||
method: 'POST' | ||
}) | ||
.then(res => res.json()) | ||
.then(json => { | ||
response.send(json) | ||
}) | ||
} |
Oops, something went wrong.
dad2c32
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
room-booking – ./
room-booking-archilogic.vercel.app
archilogic-room-booking.vercel.app
room-booking-git-master-archilogic.vercel.app