mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: add hints to session, update API
This commit is contained in:
1 parent
ae61bfc768
commit
6f368f761e
8 files changed
+52
-46
No files matched your search
@@ -6,7 +6,7 @@ import commandHandler from '../../game/commandHandler.js'
|
||||
|
||||
export async function newCommand(req, res) {
|
||||
console.log('new command:', req.body)
|
||||
const { token, command, pwd, exit_code, output } = req.body
|
||||
const { token, command, pwd, output, error } = req.body
|
||||
|
||||
if (!command) {
|
||||
res.status(400).json({ message: 'command is required' })
|
||||
@@ -33,8 +33,8 @@ export async function newCommand(req, res) {
|
||||
session,
|
||||
command,
|
||||
pwd,
|
||||
exit_code,
|
||||
output,
|
||||
error,
|
||||
})
|
||||
|
||||
await c.save()
|
||||
|
||||
Reference in new issue
Block a user