From 8fbbaebb4de5f0ce5cad442e62971070d66eb002 Mon Sep 17 00:00:00 2001 From: Keiran Price Date: Wed, 14 Aug 2019 13:53:03 +0100 Subject: [PATCH] #34: Add resources to api --- src/main.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/main.py b/src/main.py index 5658f771..44996ff8 100644 --- a/src/main.py +++ b/src/main.py @@ -41,6 +41,9 @@ from src.resources.entities.user_groups_endpoints import * from src.resources.entities.users_endpoints import * from src.resources.non_entities.sessions_endpoints import * +from src.resources.table_endpoints.table_endpoints import UsersInvestigations, UsersInvestigationsCount, \ + InstrumentsFacilityCycles, InstrumentsFacilityCyclesCount, InstrumentsFacilityCyclesInvestigations, \ + InstrumentsFacilityCyclesInvestigationsCount from src.swagger.swagger_generator import swagger_gen swagger_gen.write_swagger_spec() @@ -200,5 +203,15 @@ api.add_resource(UserGroupsCount, "/usergroups/count") api.add_resource(UserGroupsFindOne, "/usergroups/findOne") +# Table specific endpoints +api.add_resource(UsersInvestigations, "/users//investigations") +api.add_resource(UsersInvestigationsCount, "/users//investigations/count") +api.add_resource(InstrumentsFacilityCycles, "/instruments//facilityCycles") +api.add_resource(InstrumentsFacilityCyclesCount, "/instruments//facilityCycles/count") +api.add_resource(InstrumentsFacilityCyclesInvestigations, + "/instruments//facilityCycles/investigations") +api.add_resource(InstrumentsFacilityCyclesInvestigationsCount, + "/instruments//facilityCycles/investigations/count") + if __name__ == "__main__": app.run(debug=config.is_debug_mode())