Initial commit: Telegram Management System
Some checks failed
Deploy / deploy (push) Has been cancelled
Some checks failed
Deploy / deploy (push) Has been cancelled
Full-stack web application for Telegram management - Frontend: Vue 3 + Vben Admin - Backend: NestJS - Features: User management, group broadcast, statistics 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
52
marketing-agent/diagnose-frontend.js
Normal file
52
marketing-agent/diagnose-frontend.js
Normal file
@@ -0,0 +1,52 @@
|
||||
import axios from 'axios';
|
||||
|
||||
async function diagnose() {
|
||||
console.log('=== Frontend Diagnosis ===\n');
|
||||
|
||||
// Test 1: Frontend server
|
||||
try {
|
||||
const response = await axios.get('http://localhost:3008/');
|
||||
console.log('✅ Frontend server is running on port 3008');
|
||||
} catch (error) {
|
||||
console.log('❌ Frontend server not responding:', error.message);
|
||||
}
|
||||
|
||||
// Test 2: API proxy
|
||||
try {
|
||||
const response = await axios.get('http://localhost:3008/api/v1/health');
|
||||
console.log('✅ API proxy is working');
|
||||
console.log(' Health status:', response.data.status);
|
||||
} catch (error) {
|
||||
console.log('❌ API proxy not working:', error.message);
|
||||
}
|
||||
|
||||
// Test 3: Login endpoint
|
||||
try {
|
||||
const response = await axios.post('http://localhost:3008/api/v1/auth/login', {
|
||||
username: 'admin',
|
||||
password: 'admin123456'
|
||||
});
|
||||
console.log('✅ Login endpoint working');
|
||||
console.log(' Token:', response.data.data.accessToken.substring(0, 50) + '...');
|
||||
|
||||
// Test 4: Protected endpoint
|
||||
const token = response.data.data.accessToken;
|
||||
try {
|
||||
const dashResponse = await axios.get('http://localhost:3008/api/v1/analytics/dashboard', {
|
||||
headers: {
|
||||
'Authorization': `Bearer ${token}`
|
||||
}
|
||||
});
|
||||
console.log('✅ Protected endpoints accessible');
|
||||
console.log(' Dashboard data received');
|
||||
} catch (error) {
|
||||
console.log('❌ Protected endpoint error:', error.message);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log('❌ Login failed:', error.response?.data || error.message);
|
||||
}
|
||||
|
||||
console.log('\n=== Diagnosis Complete ===');
|
||||
}
|
||||
|
||||
diagnose();
|
||||
Reference in New Issue
Block a user