picgo/handler/index.go

20 lines
339 B
Go
Raw Normal View History

2024-07-11 21:25:58 +08:00
package handler
2024-07-12 20:32:33 +08:00
import (
"net/http"
"picgo/corelib"
)
func IndexHandler(w http.ResponseWriter, r *http.Request) {
if r.Method == "GET" {
data := struct {
Title string
Active string
}{
Title: "Admin Dashboard",
Active: r.URL.Path,
}
corelib.TemplateHandler(w, r, data, "view/layout.html", "view/index.html")
}
}