rm -r --cached pkg/web

This commit is contained in:
viljarb
2026-02-18 20:48:30 +01:00
parent a6ec856759
commit 77dd155299
37 changed files with 0 additions and 3558 deletions

View File

@@ -1,29 +0,0 @@
package handler
import (
"net/http"
"github.com/LazyBachelor/LazyPM/pkg/task"
)
var taskFeedback task.ValidationFeedback
func SetTaskFeedback(feedback task.ValidationFeedback) {
taskFeedback = feedback
}
func HandleTaskStatus(w http.ResponseWriter, r *http.Request) {
hx := HTMX(r)
if hx.IsHxRequest() {
if taskFeedback.Success {
hx.WriteString("<div>Task completed successfully!</div>")
} else {
hx.WriteString("<div>" + taskFeedback.Message + "</div>")
}
return
}
w.Header().Set("Content-Type", "application/json")
hx.WriteJSON(taskFeedback)
}