Add websocket wifi updates
This commit is contained in:
parent
c443fce24f
commit
1477d909b0
11 changed files with 755 additions and 10 deletions
|
|
@ -24,6 +24,7 @@ func SetupRouter(status *models.SystemStatus, cfg *config.Config, assets embed.F
|
|||
// WiFi endpoints
|
||||
wifi := api.Group("/wifi")
|
||||
{
|
||||
wifi.GET("/networks", handlers.GetWiFiNetworks)
|
||||
wifi.GET("/scan", handlers.ScanWiFi)
|
||||
wifi.POST("/connect", handlers.ConnectWiFi)
|
||||
wifi.POST("/disconnect", handlers.DisconnectWiFi)
|
||||
|
|
@ -53,8 +54,9 @@ func SetupRouter(status *models.SystemStatus, cfg *config.Config, assets embed.F
|
|||
api.DELETE("/logs", handlers.ClearLogs)
|
||||
}
|
||||
|
||||
// WebSocket endpoint
|
||||
// WebSocket endpoints
|
||||
r.GET("/ws/logs", handlers.WebSocketLogs)
|
||||
r.GET("/ws/wifi", handlers.WebSocketWifi)
|
||||
|
||||
// Serve static files
|
||||
sub, err := fs.Sub(assets, "static")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue