Skip to content

Commit

Permalink
Change relations -> stats in the get_stats response
Browse files Browse the repository at this point in the history
  • Loading branch information
davisagli committed May 19, 2023
1 parent 5e9a9d2 commit 4b9078b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/plone/restapi/services/relations/get.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ def get_relations(
def relation_stats():
if get_relations_stats is not None:
rels, broken = get_relations_stats()
results = {"relations": rels, "broken": broken}
results = {"stats": rels, "broken": broken}
return json_compatible(results)
else:
raise NotImplementedError("Not implemented in this version of Plone")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Content-Type: application/json
{
"@id": "http://localhost:55001/plone/@relations",
"broken": {},
"relations": {
"stats": {
"comprisesComponentPart": 2,
"relatedItems": 2
}
Expand Down

1 comment on commit 4b9078b

@davisagli
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ksuess I made this change so that we can tell the difference between the stats query and other queries in the relations reducer.

Please sign in to comment.