Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get lists (by list_category) #3

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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