Merge pull request #4 from Kasdrath/master

fix api url
This commit is contained in:
Chris Cromer 2023-03-02 00:00:26 -03:00 committed by GitHub
commit 40b04e4cfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 6 additions and 6 deletions

View File

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

View File

@ -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();

View File

@ -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() {

View File

@ -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 =

View File

@ -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 {

View File

@ -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 {