Refactor stations discovery and add hostapd discovery
This commit is contained in:
parent
69594c2fe4
commit
2922a03724
15 changed files with 1339 additions and 249 deletions
|
|
@ -5,10 +5,10 @@ import (
|
|||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/nemunaire/repeater/internal/config"
|
||||
"github.com/nemunaire/repeater/internal/device"
|
||||
"github.com/nemunaire/repeater/internal/hotspot"
|
||||
"github.com/nemunaire/repeater/internal/logging"
|
||||
"github.com/nemunaire/repeater/internal/models"
|
||||
"github.com/nemunaire/repeater/internal/station"
|
||||
"github.com/nemunaire/repeater/internal/wifi"
|
||||
)
|
||||
|
||||
|
|
@ -120,7 +120,7 @@ func ToggleHotspot(c *gin.Context, status *models.SystemStatus) {
|
|||
|
||||
// GetDevices returns connected devices
|
||||
func GetDevices(c *gin.Context, cfg *config.Config) {
|
||||
devices, err := device.GetConnectedDevices(cfg)
|
||||
devices, err := station.GetStations()
|
||||
if err != nil {
|
||||
logging.AddLog("Système", "Erreur lors de la récupération des appareils: "+err.Error())
|
||||
c.JSON(http.StatusInternalServerError, gin.H{"error": "Erreur lors de la récupération des appareils"})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue