watchyourlan/internal/web/host.go
2024-08-23 19:10:19 +07:00

21 lines
375 B
Go

package web
import (
"net/http"
"github.com/gin-gonic/gin"
"github.com/aceberg/WatchYourLAN/internal/models"
)
func hostHandler(c *gin.Context) {
var guiData models.GuiData
guiData.Config = appConfig
idStr := c.Param("id")
guiData.Host = getHostByID(idStr, allHosts)
c.HTML(http.StatusOK, "header.html", guiData)
c.HTML(http.StatusOK, "host.html", guiData)
}