Skip to content

Commit

Permalink
Fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
aintbe authored and jimin9038 committed Apr 12, 2022
1 parent f008e8b commit 6ca84f1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions backend/contest/serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class BankFilterSerializer(serializers.Serializer):
count = serializers.IntegerField()


class CreateConetestSeriaizer(serializers.Serializer):
class CreateContestSerializer(serializers.Serializer):
title = serializers.CharField(max_length=128)
description = serializers.CharField()
requirements = serializers.ListField(child=serializers.CharField(max_length=128))
Expand All @@ -44,7 +44,7 @@ class CreateConetestSeriaizer(serializers.Serializer):
rank_penalty_visible = serializers.BooleanField()


class EditConetestSeriaizer(serializers.Serializer):
class EditContestSerializer(serializers.Serializer):
id = serializers.IntegerField()
title = serializers.CharField(max_length=128)
description = serializers.CharField()
Expand Down
12 changes: 6 additions & 6 deletions backend/contest/views/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@
from utils.tasks import delete_files
from ..models import Contest, ContestAnnouncement, ContestPrize, ACMContestRank
from ..serializers import (ContestAnnouncementSerializer, ContestAdminSerializer,
CreateConetestSeriaizer, CreateContestAnnouncementSerializer,
EditConetestSeriaizer, EditContestAnnouncementSerializer,
CreateContestSerializer, CreateContestAnnouncementSerializer,
EditContestSerializer, EditContestAnnouncementSerializer,
ContestPrizeSerializer, ACMContestRankSerializer)


class ContestAPI(APIView):
@swagger_auto_schema(
request_body=CreateConetestSeriaizer,
request_body=CreateContestSerializer,
operation_description="Create new contest",
responses={200: ContestAdminSerializer},
)
@validate_serializer(CreateConetestSeriaizer)
@validate_serializer(CreateContestSerializer)
def post(self, request):
data = request.data
data["start_time"] = dateutil.parser.parse(data["start_time"])
Expand Down Expand Up @@ -60,11 +60,11 @@ def post(self, request):
return self.success(data)

@swagger_auto_schema(
request_body=EditConetestSeriaizer,
request_body=EditContestSerializer,
operation_description="Edit contest",
responses={200: ContestAdminSerializer},
)
@validate_serializer(EditConetestSeriaizer)
@validate_serializer(EditContestSerializer)
def put(self, request):
data = request.data
try:
Expand Down

0 comments on commit 6ca84f1

Please sign in to comment.