Use attached instead of corresponding
This commit is contained in:
@ -499,7 +499,7 @@ def make_context_index(request: Request):
|
|||||||
|
|
||||||
feed_list = []
|
feed_list = []
|
||||||
broken_feeds = []
|
broken_feeds = []
|
||||||
feeds_without_corresponding_webhook = []
|
feeds_without_attached_webhook = []
|
||||||
|
|
||||||
feeds: Iterable[Feed] = reader.get_feeds()
|
feeds: Iterable[Feed] = reader.get_feeds()
|
||||||
for feed in feeds:
|
for feed in feeds:
|
||||||
@ -512,7 +512,7 @@ def make_context_index(request: Request):
|
|||||||
|
|
||||||
webhook_list = [hook["url"] for hook in hooks]
|
webhook_list = [hook["url"] for hook in hooks]
|
||||||
if webhook not in webhook_list:
|
if webhook not in webhook_list:
|
||||||
feeds_without_corresponding_webhook.append(feed)
|
feeds_without_attached_webhook.append(feed)
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"request": request,
|
"request": request,
|
||||||
@ -521,7 +521,7 @@ def make_context_index(request: Request):
|
|||||||
"entry_count": reader.get_entry_counts(),
|
"entry_count": reader.get_entry_counts(),
|
||||||
"webhooks": hooks,
|
"webhooks": hooks,
|
||||||
"broken_feeds": broken_feeds,
|
"broken_feeds": broken_feeds,
|
||||||
"feeds_without_corresponding_webhook": feeds_without_corresponding_webhook,
|
"feeds_without_attached_webhook": feeds_without_attached_webhook,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,12 +73,12 @@ Thanks!
|
|||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<!-- Show feeds that has no corresponding webhook -->
|
<!-- Show feeds that has no attached webhook -->
|
||||||
{% if feeds_without_corresponding_webhook %}
|
{% if feeds_without_attached_webhook %}
|
||||||
<div class="p-2 mb-2 border border-dark">
|
<div class="p-2 mb-2 border border-dark">
|
||||||
<ul class="list-group text-danger">
|
<ul class="list-group text-danger">
|
||||||
Feeds without corresponding webhook:
|
Feeds without attached webhook:
|
||||||
{% for feed in feeds_without_corresponding_webhook %}
|
{% for feed in feeds_without_attached_webhook %}
|
||||||
<a class="text-muted" href="/feed?feed_url={{ feed.url|encode_url }}">{{ feed.url }}</a>
|
<a class="text-muted" href="/feed?feed_url={{ feed.url|encode_url }}">{{ feed.url }}</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</ul>
|
</ul>
|
||||||
|
Reference in New Issue
Block a user