Made assets accessible
This commit is contained in:
@@ -3,6 +3,8 @@ package frontend
|
||||
import (
|
||||
"html/template"
|
||||
"net/http"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
)
|
||||
|
||||
var dashbaord = template.Must(template.ParseFiles(
|
||||
@@ -33,3 +35,8 @@ func Dashboard(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
func Assets(w http.ResponseWriter, r *http.Request) {
|
||||
path := strings.TrimPrefix(r.URL.Path, "/assets/")
|
||||
http.ServeFile(w, r, filepath.Join("frontend/assets", path))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user