mirror of
https://github.com/suitenumerique/docs.git
synced 2026-09-22 17:45:12 +02:00
🚚(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:
@@ -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."""
|
||||
|
||||
Reference in New Issue
Block a user