16 lines
500 B
Python
16 lines
500 B
Python
from drf_spectacular.utils import extend_schema
|
|
from rest_framework.permissions import AllowAny
|
|
from rest_framework.views import APIView
|
|
|
|
from common.result import result
|
|
from users.serializers.register import RegisterSerializer
|
|
|
|
|
|
class RegisterView(APIView):
|
|
authentication_classes = []
|
|
permission_classes = [AllowAny]
|
|
|
|
@extend_schema(summary='用户注册', tags=['User Management'])
|
|
def post(self, request):
|
|
return result.success(RegisterSerializer.register(request.data))
|