events are updated
This commit is contained in:
@@ -15,7 +15,7 @@ from api_validations.validations_request import (
|
||||
InsertPostCode,
|
||||
SearchAddress,
|
||||
)
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
|
||||
@@ -55,8 +55,10 @@ class AddressListEventMethods(MethodToEvent):
|
||||
records = Addresses.filter_active(
|
||||
*Addresses.get_smart_query(list_options.query)
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="List Address records",
|
||||
result=records,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@@ -66,11 +68,12 @@ class AddressListEventMethods(MethodToEvent):
|
||||
token_dict=token_dict,
|
||||
filter_expr=Addresses.get_smart_query(list_options.query),
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="List Address records",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
class AddressCreateEventMethods(MethodToEvent):
|
||||
|
||||
event_type = "CREATE"
|
||||
@@ -345,8 +348,10 @@ class AddressPostCodeListEventMethods(MethodToEvent):
|
||||
records = AddressPostcode.filter_active(
|
||||
*Addresses.get_smart_query(list_options.query)
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="List Address records",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ from api_configs import ApiStatic, Auth
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_library.date_time_actions.date_functions import system_arrow, client_arrow
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class AuthenticationLoginEventMethods(MethodToEvent):
|
||||
|
||||
@@ -19,7 +19,7 @@ from api_validations.validations_request import (
|
||||
ListOptions,
|
||||
)
|
||||
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
@@ -50,8 +50,10 @@ class BuildListEventMethods(MethodToEvent):
|
||||
records = Build.filter_active(
|
||||
*Build.get_smart_query(smart_query=list_options.query)
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Building Records are listed",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ from databases import (
|
||||
)
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
from api_validations.validations_request import (
|
||||
InsertBuildParts,
|
||||
@@ -34,8 +34,10 @@ class BuildingBuildPartsListEventMethods(MethodToEvent):
|
||||
records = BuildParts.filter_active(
|
||||
*BuildParts.get_smart_query(list_options.query)
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Building Parts Records are listed",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from databases import (
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
from api_validations.validations_request import (
|
||||
InsertBuildLivingSpace,
|
||||
ListOptions,
|
||||
@@ -48,8 +48,10 @@ class BuildingLivingSpacesPartsListEventMethods(MethodToEvent):
|
||||
),
|
||||
*BuildLivingSpace.get_smart_query(smart_query=list_options.query),
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Building Living Spaces are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
@@ -71,8 +73,10 @@ class BuildingLivingSpacesPartsListEventMethods(MethodToEvent):
|
||||
*BuildLivingSpace.get_smart_query(smart_query=list_options.query),
|
||||
expired=False,
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Building Living Spaces are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ from api_validations.validations_request import (
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class CompanyListEventMethods(MethodToEvent):
|
||||
@@ -45,8 +45,10 @@ class CompanyListEventMethods(MethodToEvent):
|
||||
records = Companies.filter_active(
|
||||
*Companies.get_smart_query(list_options.query)
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Building Living Spaces are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from databases import Departments
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class DepartmentListEventMethods(MethodToEvent):
|
||||
@@ -34,8 +34,10 @@ class DepartmentListEventMethods(MethodToEvent):
|
||||
*Departments.get_smart_query(smart_query=list_options.query),
|
||||
Departments.company_id == token_dict.selected_company.company_id,
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Departments are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from databases import Duty
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class DutyListEventMethods(MethodToEvent):
|
||||
@@ -32,8 +32,10 @@ class DutyListEventMethods(MethodToEvent):
|
||||
records = Duty.filter_active(
|
||||
*Duty.get_smart_query(list_options.query),
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Duty list is brought successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ from databases import Employees, Staff, People, EmployeeHistory
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class EmployeeListEventMethods(MethodToEvent):
|
||||
@@ -36,8 +36,10 @@ class EmployeeListEventMethods(MethodToEvent):
|
||||
*Employees.get_smart_query(smart_query=list_options.query),
|
||||
Employees.company_id == token_dict.selected_company.company_id,
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Employee are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ from databases import Staff, Duties
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class StaffListEventMethods(MethodToEvent):
|
||||
@@ -28,8 +28,10 @@ class StaffListEventMethods(MethodToEvent):
|
||||
records = Staff.filter_active(
|
||||
*Staff.get_smart_query(smart_query=list_options.query),
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Staff are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ from api_validations.validations_request import (
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
from api_library.date_time_actions.date_functions import DateTimeLocal
|
||||
|
||||
|
||||
@@ -55,8 +55,10 @@ class DecisionBookListEventMethods(MethodToEvent):
|
||||
BuildDecisionBook.build_id == token_dict.selected_occupant.build_id,
|
||||
*BuildDecisionBook.get_smart_query(list_options.query),
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="DecisionBook are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ from databases import (
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
from api_library.date_time_actions.date_functions import system_arrow, client_arrow
|
||||
|
||||
from api_validations.validations_request import (
|
||||
@@ -75,20 +75,25 @@ class DecisionBookDecisionBookItemsListEventMethods(MethodToEvent):
|
||||
status_code=status.HTTP_404_NOT_FOUND,
|
||||
detail=f"No company is match with given Employee UUID {token_dict.selected_company.employee_uu_id}",
|
||||
)
|
||||
|
||||
BuildDecisionBookItems.filter_attr = BuildDecisionBookItems.FilterModel(**data.dump())
|
||||
records = BuildDecisionBookItems.filter_active(
|
||||
BuildDecisionBookItems.build_decision_book_id == decision_book.id
|
||||
)
|
||||
return JSONResponse(
|
||||
status_code=status.HTTP_200_OK,
|
||||
content=dict(
|
||||
total_count=records.count,
|
||||
count=len(records.data),
|
||||
message=f"Decision Book Items has found from given Decision Book UUID {data.build_decision_book_uu_id}",
|
||||
completed=True,
|
||||
data=[record.get_dict() for record in records.data],
|
||||
),
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="DecisionBook are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
# return JSONResponse(
|
||||
# status_code=status.HTTP_200_OK,
|
||||
# content=dict(
|
||||
# total_count=records.count,
|
||||
# count=len(records.data),
|
||||
# message=f"Decision Book Items has found from given Decision Book UUID {data.build_decision_book_uu_id}",
|
||||
# completed=True,
|
||||
# data=[record.get_dict() for record in records.data],
|
||||
# ),
|
||||
# )
|
||||
else:
|
||||
# BuildDecisionBookItems.pre_query = BuildDecisionBookItems.select_action(
|
||||
# occupant_id=token_dict.occupant_list["occupant_id"]
|
||||
|
||||
@@ -25,7 +25,7 @@ from api_validations.validations_request import (
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class DecisionBookPersonListEventMethods(MethodToEvent):
|
||||
|
||||
@@ -22,7 +22,7 @@ from api_validations.validations_request import (
|
||||
)
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
from api_library.date_time_actions.date_functions import system_arrow
|
||||
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class ProjectDecisionBookProjectDecisionBookEvents(MethodToEvent): ...
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class ProjectDecisionBookProjectDecisionBookPersonEvents(MethodToEvent): ...
|
||||
|
||||
@@ -15,7 +15,7 @@ from databases import (
|
||||
from api_validations.validations_request import RegisterEvents2Occupant
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class EventBindOccupantEventMethods(MethodToEvent):
|
||||
|
||||
@@ -14,7 +14,7 @@ from api_events.events.events.events_bind_services import (
|
||||
ServiceBindOccupantEventMethods,
|
||||
)
|
||||
from api_library.date_time_actions.date_functions import system_arrow
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class ModulesBindOccupantEventMethods(MethodToEvent):
|
||||
|
||||
@@ -21,7 +21,7 @@ from api_validations.validations_request import (
|
||||
)
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class ServiceBindOccupantEventMethods(MethodToEvent):
|
||||
|
||||
@@ -20,7 +20,7 @@ from api_validations.validations_request import (
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class EventsListEventMethods(MethodToEvent):
|
||||
@@ -36,11 +36,14 @@ class EventsListEventMethods(MethodToEvent):
|
||||
list_options: ListOptions,
|
||||
token_dict: Union[EmployeeTokenObject, OccupantTokenObject],
|
||||
):
|
||||
Events.filter_attr = list_options
|
||||
records = Events.filter_active(
|
||||
*Events.get_smart_query(list_options.query),
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="DecisionBook are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ from api_validations.validations_request import (
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class ModelEvents(MethodToEvent):
|
||||
|
||||
@@ -2,7 +2,7 @@ from api_validations.validations_request import DepartmentsPydantic, PatchRecord
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class ModulesEvents(MethodToEvent):
|
||||
|
||||
@@ -6,7 +6,7 @@ from api_validations.validations_request import (
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class ServicesEvents(MethodToEvent):
|
||||
|
||||
@@ -13,7 +13,7 @@ from api_validations.validations_request import InsertPerson, UpdateUsers
|
||||
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
class PeopleListEventMethods(MethodToEvent):
|
||||
@@ -31,23 +31,31 @@ class PeopleListEventMethods(MethodToEvent):
|
||||
records = People.filter_active(
|
||||
*People.get_smart_query(smart_query=list_options.query)
|
||||
)
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="People are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def sales_users_people_list(cls, data, token_dict):
|
||||
|
||||
records = People.filter_active(*People.get_smart_query(smart_query=data.query))
|
||||
# records = [model_class(**record) for record in records.data]
|
||||
return return_json_response_from_alchemy(response=records, pagination=data)
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="People are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def human_resources_users_people_list(cls, data, token_dict):
|
||||
|
||||
records = People.filter_active(*People.get_smart_query(smart_query=data.query))
|
||||
# records = [model_class(**record) for record in records.data]
|
||||
return return_json_response_from_alchemy(response=records, pagination=data)
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="People are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
class PeopleCreateEventMethods(MethodToEvent):
|
||||
@@ -91,7 +99,7 @@ class PeopleUpdateEventMethods(MethodToEvent):
|
||||
):
|
||||
find_one_user = Users.find_one_or_abort(uu_id=user_uu_id)
|
||||
access_authorized_company = Companies.select_action(
|
||||
duty_id=getattr(token_dict, "duty_id", 5),
|
||||
duty_id_list=[getattr(token_dict, "duty_id")],
|
||||
filter_expr=[Companies.id == find_one_user.id],
|
||||
)
|
||||
if access_authorized_company.count:
|
||||
|
||||
@@ -9,7 +9,8 @@ from databases.no_sql_models.validations import DomainViaUser
|
||||
from api_events.events.abstract_class import MethodToEvent, ActionsSchema
|
||||
|
||||
from api_objects.auth.token_objects import EmployeeTokenObject, OccupantTokenObject
|
||||
from api_validations.core_response import return_json_response_from_alchemy
|
||||
from api_validations.core_response import AlchemyJsonResponse
|
||||
|
||||
|
||||
from api_validations.validations_request import (
|
||||
InsertUsers,
|
||||
@@ -43,13 +44,19 @@ class UserListEventMethods(MethodToEvent):
|
||||
user.person_id
|
||||
for user in Users.filter_active(Users.uu_id.in_(people_ids)).data
|
||||
]
|
||||
People.filter_attr = list_options
|
||||
records = People.filter_active(People.id.in_(people_id_list))
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Users are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
People.filter_attr = list_options
|
||||
records = Users.filter_active(*Users.get_smart_query(list_options.query))
|
||||
return return_json_response_from_alchemy(
|
||||
response=records, pagination=list_options
|
||||
return AlchemyJsonResponse(
|
||||
completed=True,
|
||||
message="Users are listed successfully",
|
||||
result=records,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user