Skip to content

Commit

Permalink
fix: ssh session
Browse files Browse the repository at this point in the history
  • Loading branch information
devhaozi committed Oct 12, 2024
1 parent b9d5aa5 commit e1cceca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/src/api/panel/website/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export default {
request.post('/website/' + id + '/updateRemark', { remark }),
// 重置配置
resetConfig: (id: number): Promise<AxiosResponse<any>> =>
request.post('/website/' + id + '/resetConfig'),
request.post('/website/' + id + '/resetConfig', {}),
// 修改状态
status: (id: number, status: boolean): Promise<AxiosResponse<any>> =>
request.post('/website/' + id + '/status', { status })
Expand Down
4 changes: 2 additions & 2 deletions web/src/views/ssh/IndexView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const openSession = () => {
term.loadAddon(fitAddon)
const protocol = window.location.protocol === 'https:' ? 'wss' : 'ws'
const ws = new WebSocket(`${protocol}://${window.location.host}/api/panel/ssh/session`)
const ws = new WebSocket(`${protocol}://${window.location.host}/api/ssh/session`)
ws.binaryType = 'arraybuffer'
const enc = new TextDecoder('utf-8')
Expand All @@ -75,7 +75,7 @@ const openSession = () => {
ws.onerror = (event) => {
term.write('\r\nSSH连接发生错误,请刷新页面。')
term.write('\r\nSSH connection error. Please refresh the page.\r\n')
console.error(event)
console.error(event.error)
ws.close()
}
Expand Down

0 comments on commit e1cceca

Please sign in to comment.