change template

This commit is contained in:
2025-08-27 00:05:04 +02:00
parent 2c109b945e
commit 83b3a23fe4
9 changed files with 66 additions and 25 deletions

View File

@@ -15,7 +15,7 @@ import (
type (
Server struct {
r chi.Router
d data.Service
d data.Data
port uint16
}
)
@@ -26,7 +26,7 @@ var index string
//go:embed templates/description.html
var description string
func New(port uint16, d data.Service) *Server {
func New(port uint16, d data.Data) *Server {
indexTemplate := template.New("index")
indexTemplate.Parse(index)
@@ -46,7 +46,7 @@ func New(port uint16, d data.Service) *Server {
var soft data.Software
var found bool
for _, s := range d.Softwares {
if s.UUID == softID {
if s.Slug == softID {
soft = s
found = true
}