diff --git a/go/admin/api.go b/go/admin/api.go index 03702e0a..92837a8e 100644 --- a/go/admin/api.go +++ b/go/admin/api.go @@ -22,6 +22,7 @@ import ( "bytes" "context" "encoding/json" + "log" "net/http" "strings" "sync" @@ -66,7 +67,8 @@ type ( } clearQueueRequest struct { - Auth string `json:"auth"` + Auth string `json:"auth"` + RemoveAdminExecutions bool `json:"remove_admin_executions"` } ) @@ -332,9 +334,12 @@ func (a *Admin) handleClearQueue(c *gin.Context) { } requestPayload := clearQueueRequest{ - Auth: encryptedToken, + Auth: encryptedToken, + RemoveAdminExecutions: c.PostForm("remove_admin") == "true", } + log.Println(requestPayload) + jsonData, err := json.Marshal(requestPayload) if err != nil { diff --git a/go/admin/templates/add_new_executions.html b/go/admin/templates/add_new_executions.html index 49406e3a..0539c907 100644 --- a/go/admin/templates/add_new_executions.html +++ b/go/admin/templates/add_new_executions.html @@ -2,7 +2,7 @@