fix: endpoints

Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
This commit is contained in:
Ameya Shenoy 2021-02-12 18:33:21 +05:30
parent fab0a7ada3
commit 563a23a1d9
Signed by: codingcoffee
GPG key ID: F7D58AAC5DACF8D3
3 changed files with 2 additions and 19 deletions

View file

@ -7,7 +7,6 @@
from django.urls import path
from app.views import (
BhavCopyEquityView,
BhavCopyEquityDefaultRedisView,
BhavCopyEquityCustomRedisView,
EmptyRespoinseView
)
@ -15,11 +14,6 @@ from app.views import (
urlpatterns = [
path('emptyresponse/', EmptyRespoinseView.as_view(), name='emptyresponse_view'),
path('bhavcopyequity/', BhavCopyEquityView.as_view(), name='bhavcopyequity_view'),
path(
'bhavcopyequitydefaultredis/',
BhavCopyEquityDefaultRedisView.as_view(),
name='bhavcopyequitydefaultredis_view'
),
path(
'bhavcopyequitycustomredis/',
BhavCopyEquityCustomRedisView.as_view(),

View file

@ -30,16 +30,6 @@ class BhavCopyEquityView(generics.RetrieveAPIView):
return Response(serializer.data)
class BhavCopyEquityDefaultRedisView(generics.RetrieveAPIView):
queryset = BhavCopyEquity.objects.all()
@method_decorator(cache_page(60*60*2))
def get(self, request, *args, **kwargs):
queryset = self.get_queryset()
serializer = BhavCopyEquitySerializer(queryset, many=True)
return Response(serializer.data)
class EmptyRespoinseView(generics.RetrieveAPIView):
def get(self, request, *args, **kwargs):
return Response([])

View file

@ -132,9 +132,8 @@
apiEndpointSelected: { endpoint: 'bhavcopyequitycustomredis', text: "Custom Redis Cache" },
apiEndpoints: [
{ endpoint: 'emptyresponse', text: "Empty Response Endpoint" },
{ endpoint: 'bhavcopyequity', text: "Plain Endpoint" },
{ endpoint: 'bhavcopyequitydefaultredis', text: "Default Redis Cache" },
{ endpoint: 'bhavcopyequitycustomredis', text: "Custom Redis Cache" },
{ endpoint: 'bhavcopyequity', text: "Postgres Endpoint" },
{ endpoint: 'bhavcopyequitycustomredis', text: "Redis Cache" },
],
headersData: [
{text: 'Stock Code', value: 'sc_code'},