mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 11:30:13 +08:00
feat: exit shell on disconnect
This commit is contained in:
1 parent
d9836318db
commit
99da610d9e
4 files changed
+22
-12
No files matched your search
@@ -7,7 +7,6 @@ import CommandHandler from '../../game/commandHandler.js'
|
||||
export async function newCommand(req, res) {
|
||||
console.log('new command:', req.body)
|
||||
const { token, command, pwd, output, error, ...additionalData } = req.body
|
||||
console.log('additionalData:', additionalData)
|
||||
|
||||
if (!command) {
|
||||
res.status(400).json({ message: 'command is required' })
|
||||
@@ -50,7 +49,6 @@ export async function newCommand(req, res) {
|
||||
const commandHandler = new CommandHandler(session, c, additionalData)
|
||||
|
||||
const response = await commandHandler.run()
|
||||
console.log(response)
|
||||
|
||||
res.status(201).json(response)
|
||||
await session.save()
|
||||
|
||||
Reference in new issue
Block a user