Fix: url nmsl
All checks were successful
Build and release image / release-image (push) Successful in 1m28s
All checks were successful
Build and release image / release-image (push) Successful in 1m28s
This commit is contained in:
1
webpage/.env.production
Normal file
1
webpage/.env.production
Normal file
@@ -0,0 +1 @@
|
|||||||
|
VITE_EXTERNAL_URL=https://go2025.konchin.com
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Image, Alias } from './types';
|
import type { Image, Alias } from './types';
|
||||||
|
|
||||||
const API_BASE_URL = import.meta.env.EXTERNAL_URL || 'http://localhost:8080';
|
const API_BASE_URL = import.meta.env.VITE_EXTERNAL_URL;
|
||||||
|
|
||||||
// Pagination configuration
|
// Pagination configuration
|
||||||
export const ALIASES_PER_PAGE = 10; // Number of aliases to show per page
|
export const ALIASES_PER_PAGE = 10; // Number of aliases to show per page
|
||||||
@@ -8,6 +8,7 @@ export const ALIASES_PER_PAGE = 10; // Number of aliases to show per page
|
|||||||
class ApiService {
|
class ApiService {
|
||||||
// Authentication
|
// Authentication
|
||||||
async login(token: string): Promise<void> {
|
async login(token: string): Promise<void> {
|
||||||
|
console.log(`where is my fucking url: ${API_BASE_URL}`)
|
||||||
console.log("Hello, someone is trying to access the web page.");
|
console.log("Hello, someone is trying to access the web page.");
|
||||||
console.log("Token: ", token);
|
console.log("Token: ", token);
|
||||||
const response = await fetch(`${API_BASE_URL}/auth/login`, {
|
const response = await fetch(`${API_BASE_URL}/auth/login`, {
|
||||||
@@ -141,4 +142,4 @@ class ApiService {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export const api = new ApiService();
|
export const api = new ApiService();
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// src/pages/Login.tsx
|
// src/pages/Login.tsx
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
|
||||||
const API_BASE_URL = import.meta.env.EXTERNAL_URL || 'http://localhost:8080';
|
const API_BASE_URL = import.meta.env.VITE_EXTERNAL_URL;
|
||||||
|
|
||||||
interface LoginProps {
|
interface LoginProps {
|
||||||
onLoginSuccess: () => void;
|
onLoginSuccess: () => void;
|
||||||
@@ -88,4 +88,4 @@ export default function Login({ onLoginSuccess }: LoginProps) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user