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';
|
import auth from '../utils/Auth';
|
||||||
|
|
||||||
const url = new URL(window.location.href);
|
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 { onMenuToggle } = useLayout();
|
||||||
const outsideClickListener = ref(null);
|
const outsideClickListener = ref(null);
|
||||||
const topbarMenuActive = ref(false);
|
const topbarMenuActive = ref(false);
|
||||||
|
@ -13,7 +13,7 @@ var auth = {
|
|||||||
},
|
},
|
||||||
checkToken(redirect = true, callback = null) {
|
checkToken(redirect = true, callback = null) {
|
||||||
const url = new URL(window.location.href);
|
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();
|
const config = this.getTokenHeader();
|
||||||
|
|
||||||
|
@ -25,7 +25,7 @@ const setColorOptions = () => {
|
|||||||
surfaceBorder = documentStyle.getPropertyValue('--surface-border');
|
surfaceBorder = documentStyle.getPropertyValue('--surface-border');
|
||||||
};
|
};
|
||||||
const url = new URL(window.location.href);
|
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() {
|
async function getGames() {
|
||||||
|
@ -8,7 +8,7 @@ const password = ref('');
|
|||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const toast = useToast();
|
const toast = useToast();
|
||||||
const url = new URL(window.location.href);
|
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() {
|
async function onLoginClick() {
|
||||||
var login =
|
var login =
|
||||||
|
@ -20,7 +20,7 @@ const checkAuth = () => {
|
|||||||
auth.checkToken(true);
|
auth.checkToken(true);
|
||||||
};
|
};
|
||||||
const url = new URL(window.location.href);
|
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() {
|
async function showTable() {
|
||||||
try {
|
try {
|
||||||
|
@ -20,7 +20,7 @@ const checkAuth = () => {
|
|||||||
auth.checkToken(true);
|
auth.checkToken(true);
|
||||||
};
|
};
|
||||||
const url = new URL(window.location.href);
|
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() {
|
async function showTable() {
|
||||||
try {
|
try {
|
||||||
|
Loading…
Reference in New Issue
Block a user