Сделан баланс, проверка чеков, начата система создания серверов

This commit is contained in:
Georgiy Syralev
2025-09-18 16:26:11 +03:00
parent 515d31ee9e
commit cce9e7b996
54 changed files with 1914 additions and 316 deletions

View File

@@ -0,0 +1,18 @@
import { Router } from 'express';
import { createContainer } from './proxmoxApi';
const router = Router();
// Маршрут для создания контейнера
router.post('/container', async (req, res) => {
try {
const { vmid, hostname, password, ostemplate, storage, cores, memory, rootfsSize } = req.body;
const result = await createContainer({ vmid, hostname, password, ostemplate, storage, cores, memory, rootfsSize });
res.json(result);
} catch (err) {
res.status(500).json({ error: err instanceof Error ? err.message : err });
}
});
export default router;