server/tags: change response key
Since we're using "results" everywhere else, it makes little sense for tag siblings to use "siblings" node.
This commit is contained in:
parent
16d4d3ca68
commit
cf3b97b8de
3 changed files with 3 additions and 3 deletions
2
API.md
2
API.md
|
@ -491,7 +491,7 @@ data.
|
|||
|
||||
```json5
|
||||
{
|
||||
"siblings": [
|
||||
"results": [
|
||||
{
|
||||
"tag": <tag>,
|
||||
"occurrences": <occurrence-count>
|
||||
|
|
|
@ -100,4 +100,4 @@ class TagSiblingsApi(BaseApi):
|
|||
'tag': tags.serialize_tag(sibling),
|
||||
'occurrences': occurrences
|
||||
})
|
||||
return {'siblings': serialized_siblings}
|
||||
return {'results': serialized_siblings}
|
||||
|
|
|
@ -5,7 +5,7 @@ from szurubooru.func import util, tags
|
|||
|
||||
def assert_results(result, expected_tag_names_and_occurrences):
|
||||
actual_tag_names_and_occurences = {}
|
||||
for item in result['siblings']:
|
||||
for item in result['results']:
|
||||
tag_name = item['tag']['names'][0]
|
||||
occurrences = item['occurrences']
|
||||
actual_tag_names_and_occurences[tag_name] = occurrences
|
||||
|
|
Loading…
Reference in a new issue