Files
vue-pult/server/api/system.js
sasha 3e90269b0b Initial commit: Vue.js тир управления система
- Клиентская часть Vue 3 + Vite
- Серверная часть Node.js + WebSocket
- Система авторизации и смен
- Управление игровыми портами
- Поддержка тем (светлая/темная)
- Адаптивный дизайн

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-09-19 12:24:22 +03:00

41 lines
1.4 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"use strict";
const game = require('../game.js');
exports.go = async (req, res, postData, urlParsed) => {
try {
console.log('[api/system] Запрос системной информации');
const response = {
success: true,
data: {
// Информация о версии
version: global.VER || { prg: "1.0.0", git: null, commit: null, name: null },
// Статус подключения к серверу
connectedToServer: global.conn_to_server || false,
// Игровая информация
gameInfo: game.cfg.info || {},
// Состояние портов
ports: game.get() || [],
// Серийный номер CPU
serialCpu: global.serialcpu || "unknown",
// Timestamp
timestamp: Date.now()
}
};
res.end(JSON.stringify(response));
} catch (error) {
console.error('[api/system] Ошибка получения системной информации:', error);
res.end(JSON.stringify({
success: false,
error: "Ошибка получения системной информации"
}));
}
};