Skip to content

Commit

Permalink
[change] Updated URLs to match current ansible role
Browse files Browse the repository at this point in the history
A few new monitoring API URLs have been added.
I took advantage to make the URL structure equivalent
to the one used in the ansible role.
  • Loading branch information
nemesifier committed May 27, 2024
1 parent 68ccac4 commit ab7d757
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions images/openwisp_api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@

from django.urls import include, path
from openwisp.utils import env_bool, openwisp_controller_urls
from openwisp_users.api.urls import get_api_urls as ipam_api
from openwisp_users.api.urls import get_api_urls as users_api

urlpatterns = openwisp_controller_urls() + [
path('api/v1/', include((users_api(), 'users'), namespace='users')),
path('api/v1/', include((users_api(), 'users'))),
path('api/v1/', include('openwisp_utils.api.urls')),
path('api/v1/', include((ipam_api(), 'ipam'), namespace='ipam')),
]

if env_bool(os.environ['USE_OPENWISP_TOPOLOGY']):
Expand All @@ -23,11 +21,11 @@
)

urlpatterns += [
path('', include('openwisp_firmware_upgrader.urls')),
path(
'api/v1/',
include('openwisp_firmware_upgrader.api.urls', namespace='firmware'),
'',
include((fw_private_storage_urls, 'firmware'), namespace='firmware'),
),
path('', include((fw_private_storage_urls, 'firmware'), namespace='firmware')),
]

if env_bool(os.environ['USE_OPENWISP_MONITORING']):
Expand All @@ -36,4 +34,4 @@
]

if env_bool(os.environ['USE_OPENWISP_RADIUS']):
urlpatterns += [path('', include(('openwisp_radius.urls', 'radius')))]
urlpatterns += [path('', include('openwisp_radius.urls'))]

0 comments on commit ab7d757

Please sign in to comment.