Status API view
This commit is contained in:
parent
8cbe5d5944
commit
78e0d06566
2 changed files with 8 additions and 3 deletions
|
@ -1,6 +1,7 @@
|
|||
from django.urls import path
|
||||
from api.views import AvailabilityView
|
||||
from api.views import AvailabilityView, StatusView
|
||||
|
||||
urlpatterns = [
|
||||
path('availability/', AvailabilityView.as_view(), name="availability")
|
||||
path('availability/', AvailabilityView.as_view(), name="availability"),
|
||||
path('status/', AvailabilityView.as_view(), name="status"),
|
||||
]
|
|
@ -7,3 +7,7 @@ class AvailabilityView(View):
|
|||
def get(self, request):
|
||||
cards = len(Card.objects.filter(delivered__isnull=True))
|
||||
return JsonResponse({"cards": cards})
|
||||
|
||||
class StatusView(View):
|
||||
def get(self, request):
|
||||
return JsonResponse({"status": "OK", "messages": []})
|
Loading…
Reference in a new issue