Files
lash/internal/handlers/share.go
vxclutch 6da1bb9fc1 save
2026-05-27 11:14:26 -04:00

22 lines
439 B
Go

package handlers
import (
"html/template"
"net/http"
"lash"
)
type ShareData struct {
Version string
FileName string
}
func (h *ShareData) Handler(w http.ResponseWriter, r *http.Request) {
tmpl := template.Must(template.ParseFS(lash.Templates, "templates/share.html"))
if err := tmpl.ExecuteTemplate(w, "share.html", h); err != nil {
http.Error(w, "template render error: "+err.Error(), http.StatusInternalServerError)
}
}