Refresh tunnel actions promptly and clarify Feishu OIDC setup

This commit is contained in:
opsx committed 2026-10-22 00:01:12 +08:00
1 parent 41fb9d5631
commit 6a1bace3e9
10 files changed
+136 -32

No files matched your search

+3
View File
@@ -1040,12 +1040,14 @@ func (s *Server) startTunnel(c *gin.Context) {
t.State = "error"
t.LastError = err.Error()
store.DB.Save(t)
s.mgr.RemoveStatus(t.ID)
c.JSON(500, gin.H{"error": err.Error()})
return
}
t.State = "running"
t.LastError = ""
store.DB.Save(t)
s.mgr.RemoveStatus(t.ID) // the monitor's previous snapshot can lag behind this transition
store.Audit(c.GetString("username"), "start_tunnel", t.Name, "")
c.JSON(200, gin.H{"ok": true, "state": "running"})
}
@@ -1068,6 +1070,7 @@ func (s *Server) stopTunnel(c *gin.Context) {
}
t.State = "stopped"
store.DB.Save(t)
s.mgr.RemoveStatus(t.ID)
store.Audit(c.GetString("username"), "stop_tunnel", t.Name, "")
c.JSON(200, gin.H{"ok": true, "state": "stopped"})
}