diff --git a/tm_admin/organizations/api.py b/tm_admin/organizations/api.py index a0b277a..a2a76b5 100644 --- a/tm_admin/organizations/api.py +++ b/tm_admin/organizations/api.py @@ -73,9 +73,6 @@ async def initialize(self, """ await self.connect(inuri) await self.getTypes("organizations") - #await self.messagesdb.connect(uri) - #await self.usersdb.connect(uri) - #await self.teamsdb.connect(uri) async def getByID(self, org_id: int, diff --git a/tm_admin/projects/api.py b/tm_admin/projects/api.py index 6ebc0d0..bfc6a69 100755 --- a/tm_admin/projects/api.py +++ b/tm_admin/projects/api.py @@ -80,8 +80,6 @@ def __init__(self): async def initialize(self, inuri: str, - uapi: UsersAPI, - tapi: TasksAPI, ) -> None: """ Connect to all tables for API endpoints that require accessing multiple tables. @@ -91,8 +89,8 @@ async def initialize(self, """ await self.connect(inuri) await self.getTypes("projects") - self.users = uapi - self.tasks = tapi + self.users = tm_admin.users.api.UsersAPI() + self.tasks = tm_admin.tasks.api.TasksAPI() async def getByID(self, project_id: int, diff --git a/tm_admin/tasks/api.py b/tm_admin/tasks/api.py index c8b9c63..005e011 100755 --- a/tm_admin/tasks/api.py +++ b/tm_admin/tasks/api.py @@ -73,8 +73,6 @@ def __init__(self): async def initialize(self, inuri: str, - papi: ProjectsAPI, - uapi: UsersAPI, ) -> None: """ Connect to all tables for API endpoints that require @@ -85,8 +83,8 @@ async def initialize(self, """ await self.connect(inuri) await self.getTypes("tasks") - self.projects = papi - self.users = uapi + self.projects = tm_admin.projects.api.ProjectsAPI() + self.users = tm_admin.users.api.UsersAPI() async def getStatus(self, task_id: int, diff --git a/tm_admin/users/api.py b/tm_admin/users/api.py index 7323a7d..ef95777 100755 --- a/tm_admin/users/api.py +++ b/tm_admin/users/api.py @@ -66,8 +66,6 @@ def __init__(self): async def initialize(self, inuri: str, - papi: ProjectsAPI, - tapi: TasksAPI, ) -> None: """ Connect to all tables for API endpoints that require @@ -78,11 +76,13 @@ async def initialize(self, """ await self.connect(inuri) await self.getTypes("users") - # await self.projects.initialize(inuri) - await papi.initialize(inuri, self, tapi) - await tapi.initialize(inuri, papi, self) - self.projects = papi - self.tasks = tapi + + self.tasks = tm_admin.tasks.api.TasksAPI() + await self.tasks.initialize(inuri) + + self.projects = tm_admin.projects.api.ProjectsAPI() + await self.projects.initialize(inuri) + # self.cursor = "DECLARE user_cursor CURSOR FOR SELECT * FROM users;" async def getByID(self,