mirror of
https://github.com/pinry/pinry.git
synced 2026-01-10 09:12:07 +01:00
Fix: Fix 500 error while trying to access /api/v2/docs
This commit is contained in:
@@ -35,3 +35,9 @@ class CreateImageTest(TestCase):
|
||||
]
|
||||
}
|
||||
)
|
||||
|
||||
|
||||
class TestDocs(TestCase):
|
||||
def test_should_doc_api_available_without_error(self):
|
||||
response = self.client.get("/api/v2/docs")
|
||||
self.assertEqual(response.status_code, 200)
|
||||
|
||||
@@ -152,6 +152,7 @@ DRF_URL_FIELD_NAME = "resource_link"
|
||||
REST_FRAMEWORK = {
|
||||
# Use Django's standard `django.contrib.auth` permissions,
|
||||
# or allow read-only access for unauthenticated users.
|
||||
'DEFAULT_SCHEMA_CLASS': 'rest_framework.schemas.coreapi.AutoSchema',
|
||||
'DEFAULT_PERMISSION_CLASSES': [
|
||||
'rest_framework.permissions.IsAuthenticatedOrReadOnly'
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user