fix api url
This commit is contained in:
parent
630ad3a94f
commit
5e0eca4b1e
@ -8,7 +8,7 @@ import jwt_decode from 'jwt-decode';
|
||||
import auth from '../utils/Auth';
|
||||
|
||||
const url = new URL(window.location.href);
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api";
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api/v1";
|
||||
const { onMenuToggle } = useLayout();
|
||||
const outsideClickListener = ref(null);
|
||||
const topbarMenuActive = ref(false);
|
||||
|
@ -13,7 +13,7 @@ var auth = {
|
||||
},
|
||||
checkToken(redirect = true, callback = null) {
|
||||
const url = new URL(window.location.href);
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api";
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api/v1";
|
||||
|
||||
const config = this.getTokenHeader();
|
||||
|
||||
|
@ -25,7 +25,7 @@ const setColorOptions = () => {
|
||||
surfaceBorder = documentStyle.getPropertyValue('--surface-border');
|
||||
};
|
||||
const url = new URL(window.location.href);
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api";
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api/v1";
|
||||
|
||||
|
||||
async function getGames() {
|
||||
|
@ -8,7 +8,7 @@ const password = ref('');
|
||||
const router = useRouter();
|
||||
const toast = useToast();
|
||||
const url = new URL(window.location.href);
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api";
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api/v1";
|
||||
|
||||
async function onLoginClick() {
|
||||
var login =
|
||||
|
@ -20,7 +20,7 @@ const checkAuth = () => {
|
||||
auth.checkToken(true);
|
||||
};
|
||||
const url = new URL(window.location.href);
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api";
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api/v1";
|
||||
|
||||
async function showTable() {
|
||||
try {
|
||||
|
@ -20,7 +20,7 @@ const checkAuth = () => {
|
||||
auth.checkToken(true);
|
||||
};
|
||||
const url = new URL(window.location.href);
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api";
|
||||
const api = (url.port == "5173") ? "http://localhost:3001" : "/api/v1";
|
||||
|
||||
async function showTable() {
|
||||
try {
|
||||
|
Loading…
Reference in New Issue
Block a user