Remove unnecessary empty group parameter from redirect URLs

Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
Jianhui Zhao
2025-07-15 16:24:31 +08:00
parent c98a09465f
commit 4f47087148
2 changed files with 11 additions and 2 deletions
+7 -1
View File
@@ -91,7 +91,13 @@ func (srv *RttyServer) ListenAPI() error {
return
}
c.Redirect(http.StatusFound, "/rtty/"+devid+"?group="+group)
url := "/rtty/" + devid
if group != "" {
url += "?group=" + group
}
c.Redirect(http.StatusFound, url)
return
}
handleUserConnection(srv, c)
+4 -1
View File
@@ -155,7 +155,10 @@ export default {
this.selection = selection
},
connectDevice(devid) {
window.open(`/rtty/${devid}?group=${this.group}`)
let url = `/rtty/${devid}`
if (this.group)
url += `?group=${this.group}`
window.open(url)
},
connectDeviceWeb(dev) {
this.$refs.rttyWeb.show(dev)