Simplify dev docker setup
This commit is contained in:
parent
b655085115
commit
ce2255b6b7
13 changed files with 65 additions and 97 deletions
|
@ -1,5 +1,5 @@
|
|||
import { RootStore } from "./store";
|
||||
const apiUrl = `https://${process.env.API_DOMAIN}`;
|
||||
const apiUrl = process.env.API_URL;
|
||||
|
||||
type QueryParamObject = { [key: string]: string | null };
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ const isAuthenticated = async () => {
|
|||
|
||||
export const authGuard: NavigationGuard = async (to, from, next) => {
|
||||
if (await isAuthenticated()) return next();
|
||||
window.location.href = `https://${process.env.API_DOMAIN}/auth/login`;
|
||||
window.location.href = `${process.env.API_URL}/auth/login`;
|
||||
};
|
||||
|
||||
export const loginCallbackGuard: NavigationGuard = async (to, from, next) => {
|
||||
|
@ -25,5 +25,5 @@ export const loginCallbackGuard: NavigationGuard = async (to, from, next) => {
|
|||
|
||||
export const authRedirectGuard: NavigationGuard = async (to, form, next) => {
|
||||
if (await isAuthenticated()) return next("/dashboard");
|
||||
window.location.href = `https://${process.env.API_DOMAIN}/auth/login`;
|
||||
window.location.href = `${process.env.API_URL}/auth/login`;
|
||||
};
|
||||
|
|
|
@ -20,7 +20,7 @@ Vue.mixin({
|
|||
return {
|
||||
get env() {
|
||||
return Object.freeze({
|
||||
API_URL: `https://${process.env.API_DOMAIN}`,
|
||||
API_URL: process.env.API_URL,
|
||||
});
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue