fix: multiple fixes + event for market

This commit is contained in:
2026-10-07 21:38:30 +02:00
parent fdf84f9524
commit 6a5a224d3b
14 changed files with 51 additions and 24 deletions
+6 -2
View File
@@ -65,7 +65,9 @@ class PlaceConsumer(AsyncWebsocketConsumer):
await self.send(text_data=encode("r", "i"))
return
result = await self._record_placement(user, x, y, color_index, place_settings.width)
result = await self._record_placement(
user, x, y, color_index, place_settings.width
)
if result["rejected"]:
await self.send(text_data=encode("r", "c", result["next"]))
@@ -110,7 +112,9 @@ class PlaceConsumer(AsyncWebsocketConsumer):
return {
"rejected": False,
"next": to_epoch_ms(placement.placed_at + timedelta(seconds=PLACE_COOLDOWN_SECONDS)),
"next": to_epoch_ms(
placement.placed_at + timedelta(seconds=PLACE_COOLDOWN_SECONDS)
),
}
@database_sync_to_async