mirror of
https://github.com/netbox-community/netbox.git
synced 2026-03-11 21:12:11 +01:00
fixes
This commit is contained in:
@@ -27,11 +27,6 @@ router.register('config-context-profiles', views.ConfigContextProfileViewSet)
|
||||
router.register('config-templates', views.ConfigTemplateViewSet)
|
||||
router.register('scripts', views.ScriptViewSet, basename='script')
|
||||
|
||||
# Map POST to the script detail route for running scripts (without affecting the list route)
|
||||
for route in router.routes:
|
||||
if route.name == '{basename}-detail':
|
||||
route.mapping['post'] = 'post'
|
||||
|
||||
app_name = 'extras-api'
|
||||
urlpatterns = [
|
||||
path('dashboard/', views.DashboardView.as_view(), name='dashboard'),
|
||||
|
||||
@@ -264,6 +264,7 @@ class ConfigTemplateViewSet(SyncedDataMixin, ConfigTemplateRenderMixin, NetBoxMo
|
||||
#
|
||||
|
||||
@extend_schema_view(
|
||||
create=extend_schema(exclude=True), # Hide POST from list endpoint in Swagger
|
||||
update=extend_schema(request=serializers.ScriptInputSerializer),
|
||||
partial_update=extend_schema(request=serializers.ScriptInputSerializer),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user