-
Notifications
You must be signed in to change notification settings - Fork 7
feat: adds APIs to update or delete a container #757
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
67e0e34 to
426c9dd
Compare
426c9dd to
6482bf4
Compare
6482bf4 to
23fa9df
Compare
23fa9df to
2ef5c83
Compare
navinkarkera
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pomegranited Looks great! Thanks! 👍
- I tested this: (verified tests)
- I read through the code
-
I checked for accessibility issues - Includes documentation
| container_key, | ||
| ) | ||
|
|
||
| return Response({}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT: We could set the status_code to 204 for deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cf 0523899
…penedx#36371) * refactor: convert libraries API from attr.s to dataclass, fix types * fix: make corresponding updates to 'search' code * feat: use new version of openedx-learning with containers support * temp: Use opencraft branch of opaquekeys * refactor: Use LibraryElementKey instead of LibraryCollectionKey * refactor: split libraries API & REST API up into smaller modules * feat: new REST API for units in content libraries * feat: python+REST API to get a unit * feat: auto-generate slug/key/ID from title of units * feat: generate search index documents for containers * refactor: rename LibraryElementKey to LibraryItemKey * fix: lint error * feat: adds new units to search index on create/update and when running reindex_studio. Updates requirements for openedx-events and openedx-learning to support these changes. * fix: pylint * fix: temp requirement * fix: search index container events/tasks * feat: add get_library_container_usage_key to libraries API and use it when search indexing containers * fix: index all containers during reindex_studio * chore: bump openedx-events requirement * fix: address review comments * chore: bumps openedx-learning to 0.19.1 * fix: rename api method to library_container_locator since container keys are locators, not usage keys * chore: bumps opaque-keys dependency * test: fix misnamed unit_usage_key * feat: adds APIs to update or delete a container (#757) * feat: adds python and REST APIs to update a container's display_name * refactor: adds _get_container method to api to reduce code duplication * feat: adds python and REST APIs to delete a container * test: add container permission tests --------- Co-authored-by: XnpioChV <xnpiochv@gmail.com> Co-authored-by: Jillian Vogel <jill@opencraft.com> Co-authored-by: Rômulo Penido <romulo.penido@gmail.com>
Finishes the CRUD API started in openedx#36371.
Private ref: FAL-4052
Testing instructions
Should be enough to do a code review and careful check of the tests to ensure they validate the desired behaviour for these new methods.