from django.shortcuts import render

# Create your views here.
from rest_framework import viewsets
from history.models import HistorySync
from history.serializers import HistorySyncLogSerializer

from back_latienda.permissions import IsStaff


class HistorySyncViewSet(viewsets.ModelViewSet):
      queryset = HistorySync.objects.all()
      serializer_class = HistorySyncLogSerializer
      permission_classes = [IsStaff,]

      def perform_create(self, serializer):
            serializer.save(creator=self.request.user)
