mirror of
https://github.com/netfun2000/rttys_zhaojh329.git
synced 2026-02-27 09:53:24 +08:00
Remove unnecessary empty group parameter from redirect URLs
Signed-off-by: Jianhui Zhao <zhaojh329@gmail.com>
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user