🚚(global) move favorite documents API endpoint to /documents/favorites/

To respect the globally used pattern, we can safely switch to a simpler
path
This commit is contained in:
Julien Maupetit
2026-09-14 10:01:36 +00:00
committed by GitHub
parent bd4d54983a
commit 31cff890b8
5 changed files with 12 additions and 9 deletions
+2 -1
View File
@@ -486,7 +486,7 @@ class DocumentViewSet(
8. **Favorite**: Get list of favorite documents for a user. Mark or unmark
a document as favorite.
Examples:
- GET /documents/favorite_list/
- GET /documents/favorites/
- POST, DELETE /documents/{id}/favorite/
9. **Create for Owner**: Create a document via server-to-server on behalf of a user.
@@ -843,6 +843,7 @@ class DocumentViewSet(
detail=False,
methods=["get"],
permission_classes=[permissions.IsAuthenticated],
url_path="favorites",
)
def favorite_list(self, request, *args, **kwargs):
"""Get list of favorite documents for the current user."""