mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2024-11-17 06:19:26 +08:00
14 lines
560 B
Python
14 lines
560 B
Python
from .serializers import BreakageReportSerializer
|
|
from .models import BreakageReport
|
|
from rest_framework.permissions import IsAuthenticated
|
|
from rest_framework import viewsets
|
|
|
|
|
|
class BreakageReportViewSet(viewsets.ModelViewSet):
|
|
# Only allow GET
|
|
# Breakage Reports cannot be updated directly
|
|
# Changes to the associated Equipment Instances will resolve the Breakage Report itself
|
|
http_method_names = ['get']
|
|
permission_classes = [IsAuthenticated]
|
|
serializer_class = BreakageReportSerializer
|
|
queryset = BreakageReport.objects.all()
|