feat: change to use Zsh

* show message from server response
* send output and error to server
This commit is contained in:
wancat committed 2023-08-08 20:38:27 +08:00
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?'],
})
}