mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-12-01 12:26:19 -05:00
Always fetching frequent tags. Not showing the most recent tags if there are no results. Handling quoted URL for tag names.
This commit is contained in:
parent
1913755db5
commit
3d74b4bcfc
2 changed files with 22 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import asyncio
|
||||
import pathlib
|
||||
import re
|
||||
import urllib.parse
|
||||
from http import HTTPStatus
|
||||
|
||||
import vininfo.exceptions
|
||||
|
|
@ -542,6 +543,7 @@ async def get_recent_tags_request(_: Request):
|
|||
description='Get tags that frequently co-occur with the given tag',
|
||||
)
|
||||
async def get_cooccurring_tags_request(_: Request, tag_name: str):
|
||||
tag_name = urllib.parse.unquote(tag_name)
|
||||
tag_names = tags.get_cooccurring_tags(tag_name)
|
||||
return json_response(dict(tag_names=tag_names))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue