Add startup scheme
This commit is contained in:
@@ -147,6 +147,12 @@ async def update_record(record_id: str, data: dict[str, Any]) -> dict[str, Any]:
|
||||
)
|
||||
|
||||
|
||||
async def get_collection_fields() -> set[str]:
|
||||
"""Return the field names defined on the economy collection's schema."""
|
||||
data = await _request("GET", f"{PB_URL}/api/collections/{ECONOMY_COLLECTION}")
|
||||
return {f["name"] for f in data.get("fields", [])}
|
||||
|
||||
|
||||
async def count_records() -> int:
|
||||
"""Return the total number of records in the collection (single cheap request)."""
|
||||
data = await _request(
|
||||
|
||||
Reference in New Issue
Block a user