dashboard handler
This commit is contained in:
parent
b31761e6e8
commit
882548344a
@ -29,6 +29,10 @@ type Claims struct {
|
|||||||
jwt.RegisteredClaims
|
jwt.RegisteredClaims
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type picture struct {
|
||||||
|
picture string
|
||||||
|
}
|
||||||
|
|
||||||
func SetShit() {
|
func SetShit() {
|
||||||
if maxAttempts, err := strconv.Atoi(os.Getenv("CCTV_MaxFailedAttempts")); err == nil {
|
if maxAttempts, err := strconv.Atoi(os.Getenv("CCTV_MaxFailedAttempts")); err == nil {
|
||||||
MaxFailedAttempts = maxAttempts
|
MaxFailedAttempts = maxAttempts
|
||||||
@ -180,8 +184,10 @@ func DashboardHandler(w http.ResponseWriter, r *http.Request) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
p := picture{picture: newestPicture.Name()}
|
||||||
|
|
||||||
tmpl := template.Must(template.ParseFiles("views/dash.html"))
|
tmpl := template.Must(template.ParseFiles("views/dash.html"))
|
||||||
tmpl.Execute(w, newestPicture.Name())
|
tmpl.Execute(w, p)
|
||||||
}
|
}
|
||||||
|
|
||||||
func UploadHandler(w http.ResponseWriter, r *http.Request) {
|
func UploadHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user