Skip to content

Commit

Permalink
changing the name of the endpoint to sort OrderedDict
Browse files Browse the repository at this point in the history
  • Loading branch information
nilbacardit26 committed Oct 10, 2023
1 parent 48cb797 commit 70b2ec5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion guillotina/contrib/image/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ async def __call__(self):
context=IResource,
method="PATCH",
permission="guillotina.ViewContent",
name="@orderImages/{field_name}",
name="@sort/{field_name}",
**_traversed_file_doc("Order the keys of a field"),
)
class OrderMultiImage(TraversableFieldService):
Expand Down
2 changes: 1 addition & 1 deletion guillotina/tests/image/test_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ async def test_multiimage_ordered_field_with_behavior(redis_container, container
count += 1

response, status = await requester(
"PATCH", "/db/guillotina/foobar/@orderImages/images", data=json.dumps(["key3", "key2", "key0"])
"PATCH", "/db/guillotina/foobar/@sort/images", data=json.dumps(["key3", "key2", "key0"])
)
assert status == 200

Expand Down

0 comments on commit 70b2ec5

Please sign in to comment.