Skip to content
Snippets Groups Projects
Commit 2932cfbf authored by AndiMajore's avatar AndiMajore
Browse files

try to fix tissue expression route

Former-commit-id: 5ab77506
parent 8a24c048
No related branches found
No related tags found
No related merge requests found
......@@ -17,9 +17,9 @@ from django.contrib import admin
from django.urls import path
from drugstone.views import map_nodes, tasks_view, result_view, \
graph_export, TissueView, TissueExpressionView, query_tissue_proteins, TaskView, \
graph_export, TissueView, query_tissue_proteins, TaskView, \
adjacent_drugs, adjacent_disorders, fetch_edges, create_network, load_network, get_license, get_datasets, \
get_max_tissue_expression
get_max_tissue_expression, get_tissue_expression
# cache time is 6 hours
urlpatterns = [
......@@ -33,7 +33,7 @@ urlpatterns = [
path('query_tissue_proteins/', query_tissue_proteins),
path('adjacent_drugs/', adjacent_drugs),
path('adjacent_disorders/', adjacent_disorders),
path('tissue_expression/', TissueExpressionView.as_view()),
path('tissue_expression/', get_tissue_expression),
path('tissue_max_expression/', get_max_tissue_expression),
path('tissues/', TissueView.as_view()),
path('admin/', admin.site.urls),
......
......@@ -653,15 +653,8 @@ class TissueView(APIView):
return Response(TissueSerializer(many=True).to_representation(tissues))
class TissueExpressionView(APIView):
"""
Expression of host proteins in tissues.
"""
def get(self, request) -> Response:
return self.post(request)
def post(self, request) -> Response:
@api_view(['POST', 'GET'])
def get_tissue_expression(request) -> Response:
tissue = Tissue.objects.get(id=request.query_params.get('tissue'))
if request.query_params.get('proteins'):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment