watchyourlan/internal/web/index.go
2023-10-05 23:10:44 +07:00

19 lines
358 B
Go

package web
import (
"net/http"
"github.com/aceberg/WatchYourLAN/internal/db"
"github.com/aceberg/WatchYourLAN/internal/models"
)
func indexHandler(w http.ResponseWriter, r *http.Request) {
var guiData models.GuiData
AllHosts = db.Select(AppConfig.DbPath)
guiData.Config = AppConfig
guiData.Hosts = AllHosts
execTemplate(w, "index", guiData)
}