Skip to content

Commit

Permalink
Registering routers if v2 is on.
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed Aug 4, 2023
1 parent d1a3369 commit 596bf5c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions server/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,15 @@


router_v2 = routers.DefaultRouter()
router_v2.register(r'items',views_v2.ItemViewSet)
router_v2.register(r'itemsets',views_v2.ItemSetViewSet)
router_v2.register(r'documents',views_v2.DocumentViewSet)
router_v2.register(r'licenses',views_v2.LicenseViewSet)
router_v2.register(r'publishers',views_v2.PublisherViewSet)
router_v2.register(r'weapons',views_v2.WeaponViewSet)
router_v2.register(r'armor',views_v2.ArmorViewSet)
router_v2.register(r'rulesets',views_v2.RulesetViewSet)
if settings.V2_ENABLED:
router_v2.register(r'items',views_v2.ItemViewSet)
router_v2.register(r'itemsets',views_v2.ItemSetViewSet)
router_v2.register(r'documents',views_v2.DocumentViewSet)
router_v2.register(r'licenses',views_v2.LicenseViewSet)
router_v2.register(r'publishers',views_v2.PublisherViewSet)
router_v2.register(r'weapons',views_v2.WeaponViewSet)
router_v2.register(r'armor',views_v2.ArmorViewSet)
router_v2.register(r'rulesets',views_v2.RulesetViewSet)

# Wire up our API using automatic URL routing.
# Additionally, we include login URLs for the browsable API.
Expand Down

0 comments on commit 596bf5c

Please sign in to comment.