fix missing static folder
This commit is contained in:
2
main.go
2
main.go
@@ -32,7 +32,7 @@ func main() {
|
||||
r.HandleFunc("/api/images", handlers.ListFilesHandler).Methods("GET")
|
||||
r.HandleFunc("/ws", handlers.Websocket)
|
||||
r.HandleFunc("/upload", handlers.UploadHandler).Methods("POST")
|
||||
r.HandleFunc("/settings", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "settings.html") })
|
||||
r.HandleFunc("/settings", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, staticFolder+"settings.html") })
|
||||
r.HandleFunc("/api/save-schedule", handlers.SaveSchedule).Methods("POST")
|
||||
r.HandleFunc("/api/get-schedule", handlers.GetSchedule).Methods("GET")
|
||||
|
||||
|
||||
@@ -193,6 +193,7 @@
|
||||
const res = await fetch('/api/info');
|
||||
const data = await res.json();
|
||||
const uploadUrl = `http://${data.ip}:${data.port}/`;
|
||||
|
||||
new QRCode(document.getElementById("qrcode"), {
|
||||
text: uploadUrl,
|
||||
width: 128,
|
||||
|
||||
Reference in New Issue
Block a user