fix: endpoints
Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
This commit is contained in:
parent
fab0a7ada3
commit
563a23a1d9
3 changed files with 2 additions and 19 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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([])
|
||||
|
|
|
|||
|
|
@ -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'},
|
||||
|
|
|
|||
Loading…
Reference in a new issue