mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
feat: change to use Zsh
* show message from server response * send output and error to server
This commit is contained in:
1 parent
0153eae673
commit
6204bd0b17
10 files changed
+96
-104
No files matched your search
@@ -7,6 +7,11 @@ export async function newCommand(req, res) {
|
||||
console.log('new command:', req.body)
|
||||
const { token, command, pwd, exit_code, output } = req.body
|
||||
|
||||
if (!command) {
|
||||
res.status(400).json({ message: 'command is required' })
|
||||
return
|
||||
}
|
||||
|
||||
let sessionId
|
||||
try {
|
||||
const decoded = await verifySessionJWT(token)
|
||||
@@ -33,5 +38,7 @@ export async function newCommand(req, res) {
|
||||
|
||||
await c.save()
|
||||
|
||||
res.status(201).end()
|
||||
res.status(201).json({
|
||||
responses: ['Hello, world!', 'How are you?'],
|
||||
})
|
||||
}
|
||||
Reference in new issue
Block a user