Skip to content

Commit

Permalink
Fix (api): Allows public access to the api endpoints
Browse files Browse the repository at this point in the history
  • Loading branch information
leandrodesouzadev committed Nov 9, 2023
1 parent 399aaf5 commit 2e2be80
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
10 changes: 3 additions & 7 deletions src/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,10 @@

from . import v1

schema_view = drf_views.SpectacularAPIView.as_view()
swagger_view = drf_views.SpectacularSwaggerView.as_view(url_name="schema")
redoc_view = drf_views.SpectacularRedocView.as_view(url_name="schema")

app_name = "api"
urlpatterns = [
path("v1/", include((v1.urls, "api"), namespace="v1")),
path("schema/", auth_decorators.login_required(schema_view), name="schema"),
path("docs/", auth_decorators.login_required(swagger_view), name="docs"),
path("redoc/", auth_decorators.login_required(redoc_view), name="redoc"),
path("schema/", drf_views.SpectacularAPIView.as_view(), name="schema"),
path("docs/", drf_views.SpectacularSwaggerView.as_view(url_name="schema"), name="docs"),
path("redoc/", drf_views.SpectacularRedocView.as_view(url_name="schema"), name="redoc"),
]
2 changes: 1 addition & 1 deletion src/api/v1/push_notifications/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class PushNotificationOutputSchema(serializers.ModelSerializer):
"id": serializers.CharField(),
"createdAt": serializers.DateTimeField(),
"readAt": serializers.DateTimeField(),
"timeSinceCreated": serializers.DateTimeField(),
"timeSinceCreated": serializers.CharField(),
"kind": serializers.CharField(),
"meta": serializers.JSONField(),
},
Expand Down

0 comments on commit 2e2be80

Please sign in to comment.