diff --git a/lists.py b/lists.py new file mode 100644 index 0000000..79bccef --- /dev/null +++ b/lists.py @@ -0,0 +1,13 @@ +from flask import request +from flask_restful import Resource + +from data_pm import connect + + +class List(Resource): + def get(self): + response = {} + where = request.args.to_dict() + with connect() as db: + response = db.select('lists', where) + return response diff --git a/myspace_api.py b/myspace_api.py index 33406d1..fdfeb1a 100644 --- a/myspace_api.py +++ b/myspace_api.py @@ -28,6 +28,7 @@ from maintenance import MaintenanceStatusByProperty, MaintenanceByProperty, MaintenanceStatusByOwner, MaintenanceRequestsByOwner, MaintenanceRequests from contacts import ContactsMaintenance, ContactsOwnerContactsDetails, ContactsBusinessContacts, ContactsBusinessContactsOwnerDetails, ContactsBusinessContactsTenantDetails, ContactsBusinessContactsMaintenanceDetails from settings import Account +from lists import List # from refresh import Refresh # from data import connect, disconnect, execute, helper_upload_img, helper_icon_img from data_pm import connect, uploadImage, s3 @@ -420,6 +421,7 @@ def get(self, tenant_id): api.add_resource(ContactsBusinessContactsTenantDetails, '/contactsBusinessContactsTenantDetails/') api.add_resource(ContactsBusinessContactsMaintenanceDetails, '/contactsBusinessContactsMaintenanceDetails/') +api.add_resource(List, '/lists') api.add_resource(Account, '/account') api.add_resource(TenantDashboard, '/tenantDashboard/')