handle static images in ciphers
put in static folder
This commit is contained in:
3
klice.go
3
klice.go
@@ -346,6 +346,9 @@ func main() {
|
|||||||
http.HandleFunc("/admin/positions", AdminPositionsHandler)
|
http.HandleFunc("/admin/positions", AdminPositionsHandler)
|
||||||
http.HandleFunc("/admin/qr", AdminQRHandler)
|
http.HandleFunc("/admin/qr", AdminQRHandler)
|
||||||
|
|
||||||
|
// static files
|
||||||
|
http.Handle("/static/", http.StripPrefix("/static/", http.FileServer(http.Dir("static"))))
|
||||||
|
|
||||||
fmt.Println("Server started at :8080")
|
fmt.Println("Server started at :8080")
|
||||||
http.ListenAndServe(":8080", nil)
|
http.ListenAndServe(":8080", nil)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ type AdminRoutesTemplateS struct {
|
|||||||
|
|
||||||
type AdminCipherTemplateS struct {
|
type AdminCipherTemplateS struct {
|
||||||
ID int
|
ID int
|
||||||
Assignment string
|
Assignment template.HTML
|
||||||
Solution string
|
Solution string
|
||||||
Clue string
|
Clue string
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user