do not list deleted (url == "")

main
bel 2025-11-30 08:54:28 -07:00
parent 2943362587
commit 9583234df5
2 changed files with 5 additions and 3 deletions

View File

@ -35,9 +35,9 @@
<div>
<label for="{{ $k }}">
{{ $k }}
{{- if eq $k "URL" }}
{{- if eq $k "URL" }}
(hint: nyaa://?q=show)
{{ else if eq $k "WebhookURL" }}
{{ else if eq $k "WebhookURL" }}
(hint: vpntor:///outdir)
{{ end }}
</label>

View File

@ -57,7 +57,9 @@ func (h Handler) uiIndex(w http.ResponseWriter, r *http.Request) error {
editing.Version.WebhookURL = "vpntor:///data/completed-rss/TITLE"
all := []feeds.Feed{}
if err := feeds.ForEach(ctx, func(f feeds.Feed) error {
all = append(all, f)
if deleted := f.Version.URL == ""; !deleted {
all = append(all, f)
}
if f.Entry.ID == r.URL.Query().Get("edit") {
editing.Entry = f.Entry
editing.Version = f.Version