fix: id生成使用uuid

This commit is contained in:
bietiaop
2025-02-02 12:00:55 +08:00
parent f9ef3d63c7
commit 19b47f0f42

View File

@@ -40,8 +40,7 @@ export const LogRealTimeHandler: RequestHandler = async (req, res) => {
// 终端相关处理器
export const CreateTerminalHandler: RequestHandler = async (req, res) => {
try {
const id = Math.random().toString(36).substring(2);
terminalManager.createTerminal(id);
const { id } = terminalManager.createTerminal();
return sendSuccess(res, { id });
} catch (error) {
console.error('Failed to create terminal:', error);