3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-10 04:25:01 +00:00

Simplify dev docker setup

This commit is contained in:
Dragory 2022-06-26 19:30:46 +03:00
parent b655085115
commit ce2255b6b7
No known key found for this signature in database
GPG key ID: 5F387BA66DF8AAC1
13 changed files with 65 additions and 97 deletions

View file

@ -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 };

View file

@ -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`;
};

View file

@ -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,
});
},
};