Refactor stations discovery and add hostapd discovery

This commit is contained in:
nemunaire 2026-01-01 23:29:34 +07:00
commit 2922a03724
15 changed files with 1339 additions and 249 deletions

View file

@ -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"})