Ivy-Backend/ivy/accounts/views.py

14 lines
410 B
Python
Raw Normal View History

from rest_framework import viewsets
from .serializers import UserSerializer
from django.contrib.auth.models import User
from rest_framework.permissions import IsAuthenticated
2023-02-28 22:16:45 +08:00
# Create your views here.
class UserListViewSet(viewsets.ModelViewSet):
permission_classes = [IsAuthenticated]
http_method_names = ['get']
serializer_class = UserSerializer
queryset = User.objects.all()