Skip to content

Commit

Permalink
#34: Use get investigations count in resource
Browse files Browse the repository at this point in the history
  • Loading branch information
keiranjprice101 committed Aug 22, 2019
1 parent 3261184 commit ccdec3b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/resources/table_endpoints/table_endpoints.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from flask_restful import Resource

from common.database_helpers import get_investigations_for_user
from common.database_helpers import get_investigations_for_user, get_investigations_for_user_count
from common.helpers import requires_session_id, queries_records, get_filters_from_query_string


Expand All @@ -12,7 +12,10 @@ def get(self, id):


class UsersInvestigationsCount(Resource):
pass
@requires_session_id
@queries_records
def get(self, id):
return get_investigations_for_user_count(id, get_filters_from_query_string()), 200


class InstrumentsFacilityCycles(Resource):
Expand Down

0 comments on commit ccdec3b

Please sign in to comment.