fix missing static folder

This commit is contained in:
Adrian Zürcher
2026-01-17 00:04:52 +01:00
parent 45c400e7d3
commit 9543bf407b
2 changed files with 2 additions and 1 deletions

View File

@@ -32,7 +32,7 @@ func main() {
r.HandleFunc("/api/images", handlers.ListFilesHandler).Methods("GET") r.HandleFunc("/api/images", handlers.ListFilesHandler).Methods("GET")
r.HandleFunc("/ws", handlers.Websocket) r.HandleFunc("/ws", handlers.Websocket)
r.HandleFunc("/upload", handlers.UploadHandler).Methods("POST") 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/save-schedule", handlers.SaveSchedule).Methods("POST")
r.HandleFunc("/api/get-schedule", handlers.GetSchedule).Methods("GET") r.HandleFunc("/api/get-schedule", handlers.GetSchedule).Methods("GET")

View File

@@ -193,6 +193,7 @@
const res = await fetch('/api/info'); const res = await fetch('/api/info');
const data = await res.json(); const data = await res.json();
const uploadUrl = `http://${data.ip}:${data.port}/`; const uploadUrl = `http://${data.ip}:${data.port}/`;
new QRCode(document.getElementById("qrcode"), { new QRCode(document.getElementById("qrcode"), {
text: uploadUrl, text: uploadUrl,
width: 128, width: 128,