Files
at-container-registry/pkg/appview/handlers/install.go
T

26 lines
492 B
Go

package handlers
import (
"html/template"
"net/http"
)
// InstallHandler handles the /install page
type InstallHandler struct {
Templates *template.Template
RegistryURL string
}
func (h *InstallHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
data := struct {
PageData
}{
PageData: NewPageData(r, h.RegistryURL),
}
if err := h.Templates.ExecuteTemplate(w, "install", data); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
}