mirror of
https://github.com/jointakahe/takahe.git
synced 2024-12-23 05:56:29 +00:00
Fix hashtag search results (#576)
We mistakenly wrote to the key "hashtag" instead of "hashtags", resulting in no results in the API response. Additionally, the type of the Tag's `history` needs to be a list, not a dict. This fixes hashtag search in Elk.
This commit is contained in:
parent
9775fa8991
commit
b3b58df2b1
2 changed files with 2 additions and 2 deletions
|
@ -275,7 +275,7 @@ class Notification(Schema):
|
|||
class Tag(Schema):
|
||||
name: str
|
||||
url: str
|
||||
history: dict
|
||||
history: list
|
||||
following: bool | None
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -39,7 +39,7 @@ def search(
|
|||
for i in search_result["identities"]
|
||||
]
|
||||
if type is None or type == "hashtag":
|
||||
result["hashtag"] = [
|
||||
result["hashtags"] = [
|
||||
schemas.Tag.from_hashtag(h) for h in search_result["hashtags"]
|
||||
]
|
||||
if type is None or type == "statuses":
|
||||
|
|
Loading…
Reference in a new issue