aboutsummaryrefslogtreecommitdiffstats
path: root/pydis_site/apps/api/viewsets
diff options
context:
space:
mode:
authorGravatar Rohan Reddy Alleti <[email protected]>2020-10-08 15:05:06 +0530
committerGravatar GitHub <[email protected]>2020-10-08 15:05:06 +0530
commitec8a5fc2103e41a860f61a3e78f83a59a7491c3d (patch)
treec644b48a133dc5b1cce5416b933bcd040e395aab /pydis_site/apps/api/viewsets
parentfix bug with bulk create: response includes objects for users which were dupl... (diff)
parentMerge pull request #408 from imsofi/master (diff)
Merge branch 'master' into user_endpoint
Diffstat (limited to 'pydis_site/apps/api/viewsets')
-rw-r--r--pydis_site/apps/api/viewsets/__init__.py1
-rw-r--r--pydis_site/apps/api/viewsets/log_entry.py36
2 files changed, 0 insertions, 37 deletions
diff --git a/pydis_site/apps/api/viewsets/__init__.py b/pydis_site/apps/api/viewsets/__init__.py
index dfbb880d..f133e77f 100644
--- a/pydis_site/apps/api/viewsets/__init__.py
+++ b/pydis_site/apps/api/viewsets/__init__.py
@@ -12,4 +12,3 @@ from .bot import (
RoleViewSet,
UserViewSet
)
-from .log_entry import LogEntryViewSet
diff --git a/pydis_site/apps/api/viewsets/log_entry.py b/pydis_site/apps/api/viewsets/log_entry.py
deleted file mode 100644
index 9108a4fa..00000000
--- a/pydis_site/apps/api/viewsets/log_entry.py
+++ /dev/null
@@ -1,36 +0,0 @@
-from rest_framework.mixins import CreateModelMixin
-from rest_framework.viewsets import GenericViewSet
-
-from pydis_site.apps.api.models.log_entry import LogEntry
-from pydis_site.apps.api.serializers import LogEntrySerializer
-
-
-class LogEntryViewSet(CreateModelMixin, GenericViewSet):
- """
- View supporting the creation of log entries in the database for viewing via the log browser.
-
- ## Routes
- ### POST /logs
- Create a new log entry.
-
- #### Request body
- >>> {
- ... 'application': str, # 'bot' | 'seasonalbot' | 'site'
- ... 'logger_name': str, # such as 'bot.cogs.moderation'
- ... 'timestamp': Optional[str], # from `datetime.utcnow().isoformat()`
- ... 'level': str, # 'debug' | 'info' | 'warning' | 'error' | 'critical'
- ... 'module': str, # such as 'pydis_site.apps.api.serializers'
- ... 'line': int, # > 0
- ... 'message': str, # textual formatted content of the logline
- ... }
-
- #### Status codes
- - 201: returned on success
- - 400: if the request body has invalid fields, see the response for details
-
- ## Authentication
- Requires a API token.
- """
-
- queryset = LogEntry.objects.all()
- serializer_class = LogEntrySerializer