mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
WebHostLib: Properly Format IDs in API Responses (#4944)
* update the id formatter to use staticmethods to not fake the unused self arg, and then use the formatter for the user session endpoints * missed an id (ty treble) * clean up duplicate code * Update WebHostLib/__init__.py Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com> * keep the BaseConverter format * lol, change all the instances * revert this --------- Co-authored-by: Aaron Wagener <mmmcheese158@gmail.com>
This commit is contained in:
@@ -3,6 +3,7 @@ from uuid import UUID
|
||||
|
||||
from flask import abort, url_for
|
||||
|
||||
from WebHostLib import to_url
|
||||
import worlds.Files
|
||||
from . import api_endpoints, get_players
|
||||
from ..models import Room
|
||||
@@ -33,7 +34,7 @@ def room_info(room_id: UUID) -> Dict[str, Any]:
|
||||
downloads.append(slot_download)
|
||||
|
||||
return {
|
||||
"tracker": room.tracker,
|
||||
"tracker": to_url(room.tracker),
|
||||
"players": get_players(room.seed),
|
||||
"last_port": room.last_port,
|
||||
"last_activity": room.last_activity,
|
||||
|
||||
Reference in New Issue
Block a user