Browse Source

fixing base url

master
Spencer Flagg 3 years ago
parent
commit
9ff5df23c6
4 changed files with 13 additions and 7 deletions
  1. +3
    -3
      components/Map.vue
  2. +1
    -0
      fl-run.sh
  3. +7
    -2
      login/index.js
  4. +2
    -2
      plugins/env.js

+ 3
- 3
components/Map.vue View File

@ -442,7 +442,7 @@ export default {
} */ } */
#map-wrap .marker-cluster-small { #map-wrap .marker-cluster-small {
background-color: rgba(47, 151, 255, 0.9);
background-color: rgba(47, 151, 255, 0.5);
height: 30px !important; height: 30px !important;
width: 30px !important; width: 30px !important;
} }
@ -458,7 +458,7 @@ export default {
} }
#map-wrap .marker-cluster-medium { #map-wrap .marker-cluster-medium {
background-color: rgba(47, 151, 255, 0.9);
background-color: rgba(47, 151, 255, 0.5);
} }
#map-wrap .marker-cluster-medium div { #map-wrap .marker-cluster-medium div {
@ -470,7 +470,7 @@ export default {
} }
#map-wrap .marker-cluster-large { #map-wrap .marker-cluster-large {
background-color: rgba(47, 151, 255, 0.9);
background-color: rgba(47, 151, 255, 0.5);
height: 50px !important; height: 50px !important;
width: 50px !important; width: 50px !important;
} }

+ 1
- 0
fl-run.sh View File

@ -6,6 +6,7 @@ cd /usr/src
echo "\r\n\r\n\e[44m *** Getting Code from Gitea *** \e[44m\r\n" echo "\r\n\r\n\e[44m *** Getting Code from Gitea *** \e[44m\r\n"
git clone --depth 1 https://gitea.flylocal.us/spencer/flylocal-web.git git clone --depth 1 https://gitea.flylocal.us/spencer/flylocal-web.git
cd flylocal-web cd flylocal-web
curl -O https://spencerflagg.com/temp/flylocal-env/dev/.env
echo "\r\n\r\n\e[44m *** Killing Docker Containers *** \e[44m\r\n" echo "\r\n\r\n\e[44m *** Killing Docker Containers *** \e[44m\r\n"
sudo docker kill $(docker ps -q) sudo docker kill $(docker ps -q)
echo "\r\n\r\n\e[44m *** Pruning Old Docker Images *** \e[44m\r\n" echo "\r\n\r\n\e[44m *** Pruning Old Docker Images *** \e[44m\r\n"

+ 7
- 2
login/index.js View File

@ -11,9 +11,9 @@ const cookieParser = require('cookie-parser');
const baseURL = function () { const baseURL = function () {
switch (process.env.FLYLOCAL_ENV) { switch (process.env.FLYLOCAL_ENV) {
case "prod": case "prod":
return process.env.PROD_ENV;
return process.env.PROD_URL;
case "dev": case "dev":
return process.env.DEV_ENV;
return process.env.DEV_URL;
case "local": case "local":
return "http://" + process.env.LOCAL_IP + ":" + process.env.LOCAL_PORT; return "http://" + process.env.LOCAL_IP + ":" + process.env.LOCAL_PORT;
default: default:
@ -223,6 +223,9 @@ app.get("/", (req, res) => {
}); });
app.post("/auth", formParser, (req, res) => { app.post("/auth", formParser, (req, res) => {
console.log(baseURL());
//console.log(req.body); //console.log(req.body);
portier.authenticate(req.body.email).then((authUrl) => { portier.authenticate(req.body.email).then((authUrl) => {
if (req.body.redirect && typeof req.body.redirect !== 'undefined') { if (req.body.redirect && typeof req.body.redirect !== 'undefined') {
@ -236,6 +239,8 @@ app.post("/auth", formParser, (req, res) => {
app.post("/verify", formParser, (req, res) => { app.post("/verify", formParser, (req, res) => {
//console.log(req.body); //console.log(req.body);
console.log(baseURL());
portier.verify(req.body.id_token).then((email) => { portier.verify(req.body.id_token).then((email) => {
const redirectButton = (req.query.redirect && typeof req.query.redirect !== 'undefined') ? `<a class="btn btn--primary" href="${req.query.redirect}">back to your flight</a>` : `<a class="btn btn--primary" href="${baseURL()}">back to the map</a>`; const redirectButton = (req.query.redirect && typeof req.query.redirect !== 'undefined') ? `<a class="btn btn--primary" href="${req.query.redirect}">back to your flight</a>` : `<a class="btn btn--primary" href="${baseURL()}">back to the map</a>`;

+ 2
- 2
plugins/env.js View File

@ -1,9 +1,9 @@
const BASE_URL = function () { const BASE_URL = function () {
switch (process.env.FLYLOCAL_ENV) { switch (process.env.FLYLOCAL_ENV) {
case "prod": case "prod":
return process.env.PROD_ENV;
return process.env.PROD_URL;
case "dev": case "dev":
return process.env.DEV_ENV;
return process.env.DEV_URL;
case "local": case "local":
return "http://" + process.env.LOCAL_IP + ":" + process.env.LOCAL_PORT; return "http://" + process.env.LOCAL_IP + ":" + process.env.LOCAL_PORT;
default: default:

Loading…
Cancel
Save