fix: debug endpoint shows 8 ads with index to verify ads[3:6] average
Browse files
main.py
CHANGED
|
@@ -302,13 +302,14 @@ async def p2p_debug():
|
|
| 302 |
def extract(ads):
|
| 303 |
return [
|
| 304 |
{
|
|
|
|
| 305 |
"price": item["adv"].get("price"),
|
| 306 |
"surplusAmount": item["adv"].get("surplusAmount"),
|
| 307 |
"minSingleTransAmount": item["adv"].get("minSingleTransAmount"),
|
| 308 |
"maxSingleTransAmount": item["adv"].get("maxSingleTransAmount"),
|
| 309 |
"publisherType": item["adv"].get("publisherType"),
|
| 310 |
}
|
| 311 |
-
for item in ads[:
|
| 312 |
]
|
| 313 |
|
| 314 |
return {
|
|
|
|
| 302 |
def extract(ads):
|
| 303 |
return [
|
| 304 |
{
|
| 305 |
+
"index": i,
|
| 306 |
"price": item["adv"].get("price"),
|
| 307 |
"surplusAmount": item["adv"].get("surplusAmount"),
|
| 308 |
"minSingleTransAmount": item["adv"].get("minSingleTransAmount"),
|
| 309 |
"maxSingleTransAmount": item["adv"].get("maxSingleTransAmount"),
|
| 310 |
"publisherType": item["adv"].get("publisherType"),
|
| 311 |
}
|
| 312 |
+
for i, item in enumerate(ads[:8])
|
| 313 |
]
|
| 314 |
|
| 315 |
return {
|