fix: multiple fixes + event for market
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user