Update pkg/web/handler/task.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -32,7 +32,7 @@ func HandleTaskStatus(w http.ResponseWriter, r *http.Request) {
|
|||||||
if hx.IsHxRequest() {
|
if hx.IsHxRequest() {
|
||||||
if taskFeedback.Success {
|
if taskFeedback.Success {
|
||||||
w.Header().Set("HX-Trigger", "task-status-success")
|
w.Header().Set("HX-Trigger", "task-status-success")
|
||||||
w.WriteHeader(http.StatusOK)
|
w.WriteHeader(http.StatusNoContent)
|
||||||
} else {
|
} else {
|
||||||
hx.WriteString(`
|
hx.WriteString(`
|
||||||
<div id="status" type="button" hx-get="/status" hx-target="#status" hx-swap="outerHTML">
|
<div id="status" type="button" hx-get="/status" hx-target="#status" hx-swap="outerHTML">
|
||||||
|
|||||||
Reference in New Issue
Block a user