events are updated
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user