Resetting utils subtree.

This commit is contained in:
2024-11-12 11:56:07 +05:30
parent 041fb4d252
commit b65c7fd510
90 changed files with 5 additions and 15129 deletions
+5 -9
View File
@@ -57,7 +57,8 @@ from utils_v2.api.async_quart import (
only_whitelisted_ips,
limit_rate,
validate_input,
handle_cancelled_request
handle_cancelled_request,
make_ordered_json
)
# For asynchronous activities:
@@ -239,17 +240,12 @@ async def get_data(
)
# Successfully retrieved:
response = await make_response(json.to_string(data_json, no_space = True))
response.headers['Content-Type'] = "application/json"
return response
print("DATA:", dict(data_json))
return json.to_string(data_json, no_space = True)
return ResponseModel(
json_data, http_code = ResponseModel(
status_code = StatusCodes.OK,
data = data_json["content"],
message = data_json["desc"]
)
).for_quart()
return await make_ordered_json(json_data, http_code)
# ---------------------------------------------------------------------------------------------------------------------