mirror of
https://github.com/speatzle/nfsense.git
synced 2025-05-10 18:38:22 +00:00
move ws api to /ws/api, rename Handler
This commit is contained in:
parent
503464dbf1
commit
a86624caa0
2 changed files with 2 additions and 2 deletions
|
@ -23,7 +23,7 @@ func StartWebserver(conf *definitions.Config) {
|
|||
mux.HandleFunc("/logout", HandleLogout)
|
||||
mux.HandleFunc("/session", HandleSession)
|
||||
mux.HandleFunc("/api", HandleAPI)
|
||||
mux.HandleFunc("/ws", HandleWebsocketConnection)
|
||||
mux.HandleFunc("/ws/api", HandleWebsocketAPI)
|
||||
mux.HandleFunc("/", HandleWebinterface)
|
||||
|
||||
go func() {
|
||||
|
|
|
@ -10,7 +10,7 @@ import (
|
|||
"nhooyr.io/websocket/wsjson"
|
||||
)
|
||||
|
||||
func HandleWebsocketConnection(w http.ResponseWriter, r *http.Request) {
|
||||
func HandleWebsocketAPI(w http.ResponseWriter, r *http.Request) {
|
||||
c, err := websocket.Accept(w, r, nil)
|
||||
if err != nil {
|
||||
slog.Error("Accepting Websocket Connection", err)
|
||||
|
|
Loading…
Add table
Reference in a new issue