Compare commits

..

1 Commits

Author SHA1 Message Date
d7b6c345b5 Feat: add build ci
All checks were successful
Build and release image / release-image (push) Successful in 1m48s
2025-12-13 05:57:13 +08:00
4 changed files with 4 additions and 13 deletions

View File

@@ -1,5 +0,0 @@
# API Base URL for backend services
# For production deployment, set this to your backend API URL
# Example: EXTERNAL_URL=https://api.yourdomain.com
# Example: EXTERNAL_URL=http://your-server-ip:8080
EXTERNAL_URL=http://localhost:8080

View File

@@ -1 +0,0 @@
VITE_EXTERNAL_URL=https://go2025.konchin.com

View File

@@ -1,6 +1,6 @@
import type { Image, Alias } from './types'; import type { Image, Alias } from './types';
const API_BASE_URL = import.meta.env.VITE_EXTERNAL_URL; const API_BASE_URL = 'http://localhost:8080';
// 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,7 +8,6 @@ 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`, {

View File

@@ -1,8 +1,6 @@
// 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.VITE_EXTERNAL_URL;
interface LoginProps { interface LoginProps {
onLoginSuccess: () => void; onLoginSuccess: () => void;
} }
@@ -22,7 +20,7 @@ export default function Login({ onLoginSuccess }: LoginProps) {
} }
// Call backend login endpoint // Call backend login endpoint
fetch(`${API_BASE_URL}/auth/login`, { fetch('http://localhost:8080/auth/login', {
method: 'POST', method: 'POST',
headers: { headers: {
'Content-Type': 'application/json', 'Content-Type': 'application/json',