updated service binders updated

This commit is contained in:
2025-05-03 23:35:03 +03:00
parent ac8c3fe1c3
commit 01f3e82a54
82 changed files with 735 additions and 3371 deletions

View File

@@ -121,7 +121,19 @@ class EndpointResponse(BaseModel):
@property
def response(self):
"""Convert response to dictionary format."""
resutl_data = getattr(self.pagination_result, "data", None)
result_data = getattr(self.pagination_result, "data", None)
if not result_data:
return {
"completed": False,
"message": "MSG0004-NODATA",
"data": None,
"pagination": {
"page": 1,
"size": 10,
"total_count": 0,
"total_pages": 0,
},
}
result_pagination = getattr(self.pagination_result, "pagination", None)
if not result_pagination:
raise ValueError("Invalid pagination result pagination.")
@@ -131,7 +143,7 @@ class EndpointResponse(BaseModel):
return {
"completed": self.completed,
"message": self.message,
"data": resutl_data,
"data": result_data,
"pagination": pagination_dict,
}