diff --git a/internal/admin/admin.go b/internal/admin/admin.go index cfa2595..abefb72 100644 --- a/internal/admin/admin.go +++ b/internal/admin/admin.go @@ -564,6 +564,13 @@ func (a *Admin) handleChannelDetail(w http.ResponseWriter, r *http.Request) { return } + // Update enable_all_plugins + enableAllPlugins := r.FormValue("enable_all_plugins") == "true" + if err := a.db.UpdateChannelEnableAllPlugins(id, enableAllPlugins); err != nil { + http.Error(w, "Failed to update channel enable all plugins", http.StatusInternalServerError) + return + } + a.addFlash(w, r, "Channel updated", "success") http.Redirect(w, r, "/admin/channels/"+channelID, http.StatusSeeOther) return diff --git a/internal/admin/templates/channel_detail.html b/internal/admin/templates/channel_detail.html index 78909df..9f9a78d 100644 --- a/internal/admin/templates/channel_detail.html +++ b/internal/admin/templates/channel_detail.html @@ -27,6 +27,15 @@ +