Refuse newer save formats and add a gated dump of a live school.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -443,6 +443,57 @@ rebuilds the rest around it. Same success payload as GET timetable.
|
||||
Query: `classId`, `subject`, `day`, `period`. Drops that lock and rebuilds. Unknown lock is
|
||||
`404` `unknown-lesson`.
|
||||
|
||||
## Dev endpoints
|
||||
|
||||
These exist only when `HSchool:AllowSaveReload` is true (headless AppHost tests). They are never
|
||||
mapped in production by default. Same switch as `POST /api/dev/reload-schools`.
|
||||
|
||||
### `GET /api/dev/schools/{id}/dump`
|
||||
|
||||
Roster, live presence, live needs and the timetable as one JSON. The roster and lesson table come
|
||||
from the published snapshots; nodes and needs go through that school's mailbox — HTTP does not
|
||||
read the `World`. Unknown `{id}` is `404` `unknown-school`.
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"name": "Гимназия №14",
|
||||
"gameTime": "2012-04-03T10:20:00Z",
|
||||
"running": true,
|
||||
"people": [
|
||||
{
|
||||
"id": "f3.p1",
|
||||
"fullName": "Иванова Ольга Михайловна",
|
||||
"nodeId": "classroom-101",
|
||||
"needs": { "Hunger": 0.92, "Toilet": 1, "Social": 0.8, "Sleep": 1 }
|
||||
}
|
||||
],
|
||||
"now": [
|
||||
{
|
||||
"classId": "c5A",
|
||||
"subject": "Mathematics",
|
||||
"teacherId": "f3.p1",
|
||||
"roomId": "classroom-101",
|
||||
"day": 1,
|
||||
"period": 3
|
||||
}
|
||||
],
|
||||
"lessons": [
|
||||
{
|
||||
"classId": "c5A",
|
||||
"subject": "Mathematics",
|
||||
"teacherId": "f3.p1",
|
||||
"roomId": "classroom-101",
|
||||
"day": 1,
|
||||
"period": 3
|
||||
}
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
`nodeId` is null when the person is off campus. `now` is the lessons occurring at `gameTime`
|
||||
(empty on a break, night, weekend or holiday). `lessons` is the published table.
|
||||
|
||||
## WebSocket message ids
|
||||
|
||||
Client-to-server ids live in `0x00–0x7F`, server-to-client ids in `0x80–0xFF`, so a misrouted
|
||||
|
||||
Reference in New Issue
Block a user