Skip to content

Commit

Permalink
Merge pull request #3 from gthampi/GT_0901
Browse files Browse the repository at this point in the history
get lists (by list_category)
  • Loading branch information
adityabaravkar authored Sep 4, 2023
2 parents 4a96d96 + 05a4ec6 commit 47e72f7
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
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
2 changes: 2 additions & 0 deletions 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 @@ -420,6 +421,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 47e72f7

Please sign in to comment.