Skip to content

Commit

Permalink
get lists (by list_category)
Browse files Browse the repository at this point in the history
  • Loading branch information
gthampi committed Sep 1, 2023
1 parent 454cd2e commit 565b2ba
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
13 changes: 13 additions & 0 deletions lists.py
Original file line number Diff line number Diff line change
@@ -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
3 changes: 2 additions & 1 deletion myspace_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -416,7 +417,7 @@ def get(self, tenant_id):
api.add_resource(ContactsBusinessContactsTenantDetails, '/contactsBusinessContactsTenantDetails/<string:business_uid>')
api.add_resource(ContactsBusinessContactsMaintenanceDetails, '/contactsBusinessContactsMaintenanceDetails/<string:business_uid>')


api.add_resource(List, '/lists')

api.add_resource(Account, '/account')
api.add_resource(TenantDashboard, '/tenantDashboard/<string:tenant_id>')
Expand Down

0 comments on commit 565b2ba

Please sign in to comment.