mirror of
https://github.com/etesync/server
synced 2024-11-18 23:08:08 +00:00
Change all item_uids to be called item_uids.
This commit is contained in:
parent
1c8684ee92
commit
d63c34693f
@ -378,13 +378,13 @@ def item_create(item_model: CollectionItemIn, collection: models.Collection, val
|
||||
return instance
|
||||
|
||||
|
||||
@collection_router.get("/{collection_uid}/item/{uid}/")
|
||||
@collection_router.get("/{collection_uid}/item/{item_uid}/")
|
||||
def item_get(
|
||||
uid: str,
|
||||
item_uid: str,
|
||||
queryset: QuerySet = Depends(get_item_queryset),
|
||||
user: User = Depends(get_authenticated_user), prefetch: Prefetch = PrefetchQuery,
|
||||
):
|
||||
obj = queryset.get(uid=uid)
|
||||
obj = queryset.get(uid=item_uid)
|
||||
ret = CollectionItemOut.from_orm_context(obj, Context(user, prefetch))
|
||||
return MsgpackResponse(ret)
|
||||
|
||||
@ -439,16 +439,16 @@ def item_bulk_common(data: ItemBatchIn, user: User, stoken: t.Optional[str], uid
|
||||
return MsgpackResponse({})
|
||||
|
||||
|
||||
@collection_router.get("/{collection_uid}/item/{uid}/revision/")
|
||||
@collection_router.get("/{collection_uid}/item/{item_uid}/revision/")
|
||||
def item_revisions(
|
||||
uid: str,
|
||||
item_uid: str,
|
||||
limit: int = 50,
|
||||
iterator: t.Optional[str] = None,
|
||||
prefetch: Prefetch = PrefetchQuery,
|
||||
user: User = Depends(get_authenticated_user),
|
||||
items: QuerySet = Depends(get_item_queryset),
|
||||
):
|
||||
item = get_object_or_404(items, uid=uid)
|
||||
item = get_object_or_404(items, uid=item_uid)
|
||||
|
||||
queryset = item.revisions.order_by("-id")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user