Skip to content

Comments

✨(backend) admin api offering deeplink viewset and serializers#1276

Open
jonathanreveille wants to merge 4 commits intofeat/add_deep_link_to_my_cpffrom
feature/admin_api_offering_deeplink_viewset_and_serializers
Open

✨(backend) admin api offering deeplink viewset and serializers#1276
jonathanreveille wants to merge 4 commits intofeat/add_deep_link_to_my_cpffrom
feature/admin_api_offering_deeplink_viewset_and_serializers

Conversation

@jonathanreveille
Copy link
Member

@jonathanreveille jonathanreveille commented Jan 28, 2026

Purpose

We want admin authenticated user to be able to manage deep links of an offering for the related organizations.
We also added a new endpoint in the OfferingViewSet to activate the deep links when needed.

Proposal

  • create nested viewset into offering route NestedOfferingDeepLinkViewSet ( CRUD ) and serializer
  • add endpoint to toggle deeplinks on OfferingViewSet

@jonathanreveille jonathanreveille self-assigned this Jan 28, 2026
@jonathanreveille jonathanreveille force-pushed the feat/add_deep_link_to_my_cpf branch 2 times, most recently from 07597e7 to 6362cf0 Compare January 29, 2026 16:43
@jonathanreveille jonathanreveille force-pushed the feature/admin_api_offering_deeplink_viewset_and_serializers branch 2 times, most recently from 573bcf9 to 2a6b878 Compare January 30, 2026 12:07
@jonathanreveille jonathanreveille force-pushed the feat/add_deep_link_to_my_cpf branch from 6362cf0 to 38e00a8 Compare February 2, 2026 14:25
@jonathanreveille jonathanreveille force-pushed the feature/admin_api_offering_deeplink_viewset_and_serializers branch 3 times, most recently from ceb0b02 to 4881dd7 Compare February 3, 2026 17:09
@jonathanreveille jonathanreveille force-pushed the feat/add_deep_link_to_my_cpf branch 2 times, most recently from 14462fa to c91c344 Compare February 3, 2026 17:49
@jonathanreveille jonathanreveille force-pushed the feature/admin_api_offering_deeplink_viewset_and_serializers branch 6 times, most recently from 12f66d3 to 89fc9c9 Compare February 4, 2026 13:22
@jonathanreveille jonathanreveille force-pushed the feat/add_deep_link_to_my_cpf branch from c91c344 to 2173e96 Compare February 4, 2026 13:35
@jonathanreveille jonathanreveille force-pushed the feature/admin_api_offering_deeplink_viewset_and_serializers branch from 89fc9c9 to 2cd4652 Compare February 4, 2026 14:08
@jonathanreveille jonathanreveille force-pushed the feat/add_deep_link_to_my_cpf branch from 2173e96 to 6d690b4 Compare February 4, 2026 14:12
@kernicPanel kernicPanel requested a review from Copilot February 6, 2026 09:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds admin API functionality for managing deep links associated with course offerings in the Joanie backend. Deep links allow learners to subscribe to courses through external platforms (e.g., Mon Compte Formation in France). The implementation includes a nested viewset for full CRUD operations on offering deep links, a toggle endpoint to activate/deactivate all deep links for an offering, and comprehensive test coverage.

Changes:

  • Added NestedOfferingDeepLinkViewSet with CRUD operations for managing offering deep links via admin API
  • Implemented toggle_deeplinks action on OfferingViewSet to bulk activate/deactivate deep links
  • Added model methods: toggle_deeplinks() on CourseProductRelation and custom delete() on OfferingDeepLink with validation
  • Created AdminOfferingDeepLinkSerializer for API data serialization

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
src/backend/joanie/core/api/admin/init.py Added NestedOfferingDeepLinkViewSet with CRUD methods and toggle_deeplinks action on OfferingViewSet
src/backend/joanie/core/serializers/admin.py Added AdminOfferingDeepLinkSerializer with custom representation method
src/backend/joanie/core/models/courses.py Added toggle_deeplinks method and custom delete validation
src/backend/joanie/admin_urls.py Registered offering-deeplinks nested routes
src/backend/joanie/tests/swagger/admin-swagger.json Added OpenAPI spec for new endpoints
src/backend/joanie/tests/core/api/admin/offerings/test_toggle_deeplinks.py Comprehensive tests for toggle deeplinks endpoint
src/backend/joanie/tests/core/api/admin/offering_deeplinks/*.py Full test suite for CRUD operations (create, retrieve, list, update, delete)
src/backend/joanie/tests/core/api/admin/offering_deeplinks/init.py Package initialization file

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jonathanreveille jonathanreveille force-pushed the feat/add_deep_link_to_my_cpf branch 3 times, most recently from 18821b2 to a16f217 Compare February 12, 2026 16:17
We want admin backoffice users to be able to manage deep links
of an offering for organizations.
We want admin authenticated user to be able to toggle
on or off the deep links of an offering. This will allow
them to activate or desactivate the possibility to redirect
the learners to the external platform to make subscriptions.
@jonathanreveille jonathanreveille force-pushed the feature/admin_api_offering_deeplink_viewset_and_serializers branch 2 times, most recently from 0957419 to 1241e29 Compare February 12, 2026 16:53
@jonathanreveille jonathanreveille force-pushed the feature/admin_api_offering_deeplink_viewset_and_serializers branch from 1241e29 to 26cba34 Compare February 12, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants