diff options
| author | 2020-10-06 22:00:26 +0200 | |
|---|---|---|
| committer | 2020-10-06 22:00:26 +0200 | |
| commit | c3752e5d9ee26de06f34db49f5dc41bee7bab262 (patch) | |
| tree | 551a747b6b1c90f7c450cac4abd3759fd0a21fc5 /pydis_site/apps/api/viewsets | |
| parent | Added metricity db connection and user bot API (diff) | |
| parent | Merge pull request #403 from ks129/logging-cleanup (diff) | |
Merge branch 'master' into feat/397-398-metricity-db-and-api
Diffstat (limited to 'pydis_site/apps/api/viewsets')
| -rw-r--r-- | pydis_site/apps/api/viewsets/__init__.py | 1 | ||||
| -rw-r--r-- | pydis_site/apps/api/viewsets/log_entry.py | 36 | 
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 | 
